4 Replies Latest reply on Jan 12, 2017 2:00 PM by kevinq19750741

    cordova-plugin-geofence error on ios

    stefanot77493002 Level 1

      I've added this plugin but I receive error after build.

       

      In my config.xml

      <plugin name="cordova-plugin-geofence" spec="https://github.com/cowbell/cordova-plugin-geofence.git" />

       

      Anyone knows how can I fix it?

       

      Thanks

        • 1. Re: cordova-plugin-geofence error on ios
          VectorP Level 4

          Well, have a look at the docs here:

          GitHub - cowbell/cordova-plugin-geofence: Geofencing plugin for cordova

           

          At the top, it contains an icon, saying that Android Builds are failing.

          In the docs text, it says that the only OS it should fully support is....Android.

          So, if everything is true what is being written there, I wouldn't expect much, anyway.

           

          Having said that, what is the error, per

          I receive error after build.

          ?

          • 2. Re: cordova-plugin-geofence error on ios
            stefanot77493002 Level 1

            This is the log where there are errors:

             

            CompileSwift normal arm64 /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/GeofencePlugin.swi ft

              cd /tmp/gimlet/2065222/project

              /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/sw ift -frontend -c -primary-file /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/GeofencePlugin.swi ft /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/SwiftData.swift /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/SwiftyJson.swift -target arm64-apple-ios7.0 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPh oneOS10.1.sdk -I /tmp/gimlet/2065222/project/build -F /tmp/gimlet/2065222/project/build -g -import-objc-header /tmp/gimlet/2065222/project/Ethiconomy/Bridging-Header.h -serialize-debugging-options -Xcc -I/tmp/gimlet/2065222/project/build/Ethiconomy.build/Release-iphoneos/Ethiconomy.build/sw ift-overrides.hmap -Xcc -iquote -Xcc /tmp/gimlet/2065222/project/build/Ethiconomy.build/Release-iphoneos/Ethiconomy.build/Ethi conomy-generated-files.hmap -Xcc -I/tmp/gimlet/2065222/project/build/Ethiconomy.build/Release-iphoneos/Ethiconomy.build/Et hiconomy-own-target-headers.hmap -Xcc -I/tmp/gimlet/2065222/project/build/Ethiconomy.build/Release-iphoneos/Ethiconomy.build/Et hiconomy-all-target-headers.hmap -Xcc -iquote -Xcc /tmp/gimlet/2065222/project/build/Ethiconomy.build/Release-iphoneos/Ethiconomy.build/Ethi conomy-project-headers.hmap -Xcc -I/tmp/gimlet/2065222/project/build/include -Xcc -I/tmp/gimlet/2065222/project/build/usr/local/lib/include -Xcc -I/tmp/gimlet/2065222/project/build/UninstalledProducts/include -Xcc -I/tmp/gimlet/2065222/project/build/UninstalledProducts/iphoneos/include -Xcc -I/tmp/gimlet/2065222/project/build -Xcc -I/tmp/gimlet/2065222/project/build/Ethiconomy.build/Release-iphoneos/Ethiconomy.build/De rivedSources/arm64 -Xcc -I/tmp/gimlet/2065222/project/build/Ethiconomy.build/Release-iphoneos/Ethiconomy.build/De rivedSources -Xcc -working-directory/tmp/gimlet/2065222/project -emit-module-doc-path /tmp/gimlet/2065222/project/build/Ethiconomy.build/Release-iphoneos/Ethiconomy.build/Obje cts-normal/arm64/GeofencePlugin~partial.swiftdoc -O -module-name Ethiconomy -emit-module-path /tmp/gimlet/2065222/project/build/Ethiconomy.build/Release-iphoneos/Ethiconomy.build/Obje cts-normal/arm64/GeofencePlugin~partial.swiftmodule -serialize-diagnostics-path /tmp/gimlet/2065222/project/build/Ethiconomy.build/Release-iphoneos/Ethiconomy.build/Obje cts-normal/arm64/GeofencePlugin.dia -emit-dependencies-path /tmp/gimlet/2065222/project/build/Ethiconomy.build/Release-iphoneos/Ethiconomy.build/Obje cts-normal/arm64/GeofencePlugin.d -emit-reference-dependencies-path /tmp/gimlet/2065222/project/build/Ethiconomy.build/Release-iphoneos/Ethiconomy.build/Obje cts-normal/arm64/GeofencePlugin.swiftdeps -o /tmp/gimlet/2065222/project/build/Ethiconomy.build/Release-iphoneos/Ethiconomy.build/Obje cts-normal/arm64/GeofencePlugin.o

            /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/SwiftyJson.swift:18 1:39: error: '=' has been replaced with ':' in attribute arguments

              @available(*, unavailable, renamed="null")

              ^

              :

            /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/SwiftyJson.swift:89 7:35: error: expected ',' joining parts of a multi-clause condition

              if let errorValue = error where errorValue.code == ErrorNotExist{

              ~^~~~~

              ,

            /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/SwiftData.swift:161 2:21: error: 'SQLiteDB' is inaccessible due to 'private' protection level

            extension SwiftData.SQLiteDB {

              ^

            /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/SwiftData.swift:103 6:19: note: type declared here

              private class SQLiteDB {

              ^

            /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/SwiftData.swift:183 1:21: error: 'SQLiteDB' is inaccessible due to 'private' protection level

            extension SwiftData.SQLiteDB {

              ^

            /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/SwiftData.swift:103 6:19: note: type declared here

              private class SQLiteDB {

              ^

            /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/SwiftData.swift:197 1:21: error: 'SDError' is inaccessible due to 'private' protection level

            extension SwiftData.SDError {

              ^

            /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/SwiftData.swift:160 3:20: note: type declared here

              private struct SDError {

              ^

            /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/SwiftyJson.swift:27 4:26: error: 'ForwardIndexType' has been renamed to 'Comparable'

            public struct JSONIndex: ForwardIndexType, _Incrementable, Equatable, Comparable {

              ^~~~~~~~~~~~~~~~

              Comparable

            /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/SwiftyJson.swift:65 9:23: error: no type named 'Printable' in module 'Swift'

            extension JSON: Swift.Printable, Swift.DebugPrintable {

              ^

            /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/SwiftyJson.swift:65 9:40: error: no type named 'DebugPrintable' in module 'Swift'

            extension JSON: Swift.Printable, Swift.DebugPrintable {

              ^

            /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/SwiftyJson.swift:76 0:1: error: inheritance from non-protocol type 'BooleanType' (aka 'Bool')

            extension JSON: Swift.BooleanType {

            ^

            /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/GeofencePlugin.swif t:30:20: error: 'DISPATCH_QUEUE_PRIORITY_DEFAULT' has been renamed to 'DispatchQueue.GlobalQueuePriority.default'

              let priority = DISPATCH_QUEUE_PRIORITY_DEFAULT

              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

              DispatchQueue.GlobalQueuePriority.default

            Dispatch.DISPATCH_QUEUE_PRIORITY_DEFAULT:2:12: note: 'DISPATCH_QUEUE_PRIORITY_DEFAULT' has been explicitly marked unavailable here

            public var DISPATCH_QUEUE_PRIORITY_DEFAULT: Int { get }

              ^

            /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/GeofencePlugin.swif t:185:20: error: 'DISPATCH_QUEUE_PRIORITY_DEFAULT' has been renamed to 'DispatchQueue.GlobalQueuePriority.default'

              let priority = DISPATCH_QUEUE_PRIORITY_DEFAULT

              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

              DispatchQueue.GlobalQueuePriority.default

            Dispatch.DISPATCH_QUEUE_PRIORITY_DEFAULT:2:12: note: 'DISPATCH_QUEUE_PRIORITY_DEFAULT' has been explicitly marked unavailable here

            public var DISPATCH_QUEUE_PRIORITY_DEFAULT: Int { get }

              ^

            /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/GeofencePlugin.swif t:352:10: warning: instance method 'locationManager(manager:didUpdateLocations:)' nearly matches optional requirement 'locationManager(_:didUpdateLocations:)' of protocol 'CLLocationManagerDelegate'

              func locationManager(manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {

              ^

            /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/GeofencePlugin.swif t:352:10: note: rename to 'locationManager(_:didUpdateLocations:)' to satisfy this requirement

              func locationManager(manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {

              ^

              _

            /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/GeofencePlugin.swif t:352:10: note: move 'locationManager(manager:didUpdateLocations:)' to an extension to silence this warning

              func locationManager(manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {

              ^

            /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/GeofencePlugin.swif t:352:10: note: make 'locationManager(manager:didUpdateLocations:)' private to silence this warning

              func locationManager(manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {

              ^

              private

            /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/GeofencePlugin.swif t:352:10: note: add '@nonobjc' to silence this warning

              func locationManager(manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {

              ^

              @nonobjc

            CoreLocation.CLLocationManagerDelegate:5:26: note: requirement 'locationManager(_:didUpdateLocations:)' declared here

              optional public func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation])

              ^

            /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/GeofencePlugin.swif t:356:10: warning: instance method 'locationManager(manager:didFailWithError:)' nearly matches optional requirement 'locationManager(_:didFailWithError:)' of protocol 'CLLocationManagerDelegate'

              func locationManager(manager: CLLocationManager, didFailWithError error: NSError) {

              ^

            /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/GeofencePlugin.swif t:356:10: note: candidate has non-matching type '(CLLocationManager, NSError) -> ()'

              func locationManager(manager: CLLocationManager, didFailWithError error: NSError) {

              ^ ~~~~~~~

              Error

            /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/GeofencePlugin.swif t:356:10: note: move 'locationManager(manager:didFailWithError:)' to an extension to silence this warning

              func locationManager(manager: CLLocationManager, didFailWithError error: NSError) {

              ^

            /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/GeofencePlugin.swif t:356:10: note: make 'locationManager(manager:didFailWithError:)' private to silence this warning

              func locationManager(manager: CLLocationManager, didFailWithError error: NSError) {

              ^

              private

            /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/GeofencePlugin.swif t:356:10: note: add '@nonobjc' to silence this warning

              func locationManager(manager: CLLocationManager, didFailWithError error: NSError) {

              ^

              @nonobjc

            CoreLocation.CLLocationManagerDelegate:21:26: note: requirement 'locationManager(_:didFailWithError:)' declared here

              optional public func locationManager(_ manager: CLLocationManager, didFailWithError error: Error)

              ^

            /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/GeofencePlugin.swif t:360:10: warning: instance method 'locationManager(manager:didFinishDeferredUpdatesWithError:)' nearly matches optional requirement 'locationManager(_:didFinishDeferredUpdatesWithError:)' of protocol 'CLLocationManagerDelegate'

              func locationManager(manager: CLLocationManager, didFinishDeferredUpdatesWithError error: NSError?) {

              ^

            /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/GeofencePlugin.swif t:360:10: note: candidate has non-matching type '(CLLocationManager, NSError?) -> ()'

              func locationManager(manager: CLLocationManager, didFinishDeferredUpdatesWithError error: NSError?) {

              ^ ~~~~~~~~

              Error?

            /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/GeofencePlugin.swif t:360:10: note: move 'locationManager(manager:didFinishDeferredUpdatesWithError:)' to an extension to silence this warning

              func locationManager(manager: CLLocationManager, didFinishDeferredUpdatesWithError error: NSError?) {

              ^

            /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/GeofencePlugin.swif t:360:10: note: make 'locationManager(manager:didFinishDeferredUpdatesWithError:)' private to silence this warning

              func locationManager(manager: CLLocationManager, didFinishDeferredUpdatesWithError error: NSError?) {

              ^

              private

            /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/GeofencePlugin.swif t:360:10: note: add '@nonobjc' to silence this warning

              func locationManager(manager: CLLocationManager, didFinishDeferredUpdatesWithError error: NSError?) {

              ^

              @nonobjc

            CoreLocation.CLLocationManagerDelegate:33:26: note: requirement 'locationManager(_:didFinishDeferredUpdatesWithError:)' declared here

              optional public func locationManager(_ manager: CLLocationManager, didFinishDeferredUpdatesWithError error: Error?)

              ^

            /tmp/gimlet/2065222/project/Ethiconomy/Plugins/cordova-plugin-geofence/GeofencePlugin.swif t:364:10: warning: instance method 'locationManager(manager:didEnterRegion:)' nearly matches optional requirement 'locationManager(_:didEnterRegion:)' of protocol 'CLLocationManagerDelegate'

            • 3. Re: cordova-plugin-geofence error on ios
              VectorP Level 4

              These appear to be syntax error messages from within the plugin.

              I would recommend posting an issue at the plugin's Github page, or contacting the plugin author directly.

              • 4. Re: cordova-plugin-geofence error on ios
                kevinq19750741

                the docs reference the UseLegacySwift pref, but it does nothing for me.

                the swift-version pref got it going though...

                 

                 

                <preference name="swift-version" value="2.3" />

                 

                <preference name="UseLegacySwiftLanguageVersion" value="true" />