Closed KindTech closed 6 years ago
Update: Implementing the changes in https://github.com/cowbell/cordova-plugin-geofence/pull/224 fixed the issue.
Ok apparently it didn't fix the issue.
Is anybody maintaining this plugin?
So to fix this: assuming you've done #231 and #224 in GeofencePlugin.swift replace
let locationManager = CLLocationManager()
with
let locationManager = { () -> CLLocationManager in
// CLLocationManager must be created on main thread otherwise
// it will generate an error at init time.
if Thread.isMainThread {
return CLLocationManager()
} else {
return DispatchQueue.main.sync {
return CLLocationManager()
}
}
}()
IOS 10.3 ionic 2 xcode 8.3.3 Location set to always Have done conversion as described in https://github.com/cowbell/cordova-plugin-geofence/issues/231
When adding a geofence, I get a warning showing in XCode:
Immediately after that I get a EXC_BAD_ACCESS (code:1) at GeoNotificationManager.init()
Stepping up the trace leads to addOrUpdate.
Relevant code from adding geofence: