React-native-background-geolocation: iOS issue - 'onGeofence' doesn't get triggered if geofence is around the user's current location

Created on 25 Oct 2016  路  3Comments  路  Source: transistorsoft/react-native-background-geolocation

I am using following code -
bgGeo.onGeofence(function(geofence, taskId) {
console.log('Geofence Triggered', geofence);
}
Well! it works fine on android.

enhancement

Most helpful comment

Ok, I've got a solution working for iOS. Should be posted today, in addition to new @config {Boolean} geofenceInitialTriggerEntry [true].

All 3 comments

Correct. iOS doesn't have the ability to trigger a geofence if device is already in it. The Android geofencing API allows this to be configurable (the plugin hardcodes this to trigger)

Someone on the Cordova plugin wants this too. I'm looking into it.

Ok, I've got a solution working for iOS. Should be posted today, in addition to new @config {Boolean} geofenceInitialTriggerEntry [true].

Thanks :-)

Was this page helpful?
0 / 5 - 0 ratings