cowbell / cordova-plugin-geofence

Geofencing plugin for cordova
Apache License 2.0
265 stars 316 forks source link

Build fail on phonegap build #31

Closed QuentinFchx closed 9 years ago

QuentinFchx commented 9 years ago

When using this plugin with Phonegap Build, it fails during the compilation.

The following build commands failed:
    CompileSwift normal arm64 /project/PGProject/Plugins/com.cowbell.cordova.geofence/GeofencePlugin.swift
    CompileSwift normal arm64 /project/PGProject/Plugins/com.cowbell.cordova.geofence/SwiftData.swift
    CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler

Full stack trace

I have absolutely no knowledge of Swift. @tsubik could you help me please ?

tsubik commented 9 years ago

I am not an expert either :smile:. That part of plugin is my only code written in swift so far. Try to open project in xcode and make sure bridging headers are correct. It should be main Bridging-Header.h which basically import others "bridging headers" from the project (it should be generated by add_swift_support hook) and Geo-Bridging-Header.h. I've tried to make my plugin compatible with other swift plugins.

QuentinFchx commented 9 years ago

Yep, it was an issue with bridging header :) Thanks for your help ! :+1:

rodneyworkman291 commented 8 years ago

I am having this same issue as posted below in stackoverflow. I can open my project in xcode but I am not sure how to make sure bridging headers are correct.

http://stackoverflow.com/questions/33828532/phonertc-build-issues-in-phonegap-bridging-header-h-issue

johnrobertcobbold commented 8 years ago

@tsubik Following updating Cordova to version 4 and https://issues.apache.org/jira/browse/CB-10072, I had to change the content of SWIFT_OBJC_BRIDGING_HEADER and add 'Plugins' to the path for the building to find the header file. Not sure how other plugins are doing, perhaps you want to locate the bridge in the PROJECT_NAME folder, not PROJECT_NAME/PLUGINS anymore? For your consideration.

scriby commented 8 years ago

I am encountering this issue on phonegap build. Anyone know how to resolve it there?