Closed stefanotauriello closed 7 years ago
in config.xml set
I think what @kevinleequinn was trying to say is, in config.xml add the line:
<preference name="UseLegacySwiftLanguageVersion" value="true" />
This has to do with these three files not being swift 3.0 and thus needing legacy swift support
odd my msg didn't come through. for Phonegap Build the legacy line didn't help me, but the custom PG Build preference did:
<preference name="swift-version" value="2.3" />
Never tried phonegap build, but in the past this plugin used cordova hooks to set swift version for xCode project. PhoneGap, as I'm aware, does not support hooks.
@kevinleequinn, So looks like setting <preference name="swift-version" value="2.3" />
solves the problem, right? Closing for now.
I'm trying building my app with your plugin but Phonegap Build failed:
/tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/SwiftyJson.swift:68:43: error: 'NSJSONReadingOptions' has been renamed to 'JSONSerialization.ReadingOptions' public init(data:NSData, options opt: NSJSONReadingOptions = .AllowFragments, error: NSErrorPointer = nil) { ^
~~~~~~~ JSONSerialization.ReadingOptions /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/GeofencePlugin.swift:102:72: error: missing argument label 'geoNotification:' in call self.geoNotificationManager.addOrUpdateGeoNotification(JSON(geo)) ^ geoNotification: /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/GeofencePlugin.swift:106:39: error: 'sendPluginResult(:callbackId:)' has been renamed to 'send(:callbackId:)' self.commandDelegate!.sendPluginResult(pluginResult, callbackId: command.callbackId) ^~~~send