GeoFencing isn't working when the app is killed/closed (not in the background)
See original GitHub issueEnvironment iPhone iOS 12.4
npmPackages: expo: 34.0.0 “react”: “16.9.0”, “react-native”: “https://github.com/expo/react-native/archive/sdk-34.0.0.tar.gz”, “expo-location”: “~6.0.0”, “expo-task-manager”: “~6.0.0”,
Steps to Reproduce
Testing GeoFencing. Running on a stand alone device. Everything works correctly when the app is in the foreground (open) or in the background. However, as soon as I swipe up the app and kill it. GeoFencing stops working. No event notifications are received when either entering or exiting the specified location.
Relevant Code
In App.js (in global scope, not inside a component)
TaskManager.defineTask(GEO_TRACK_LOCATION, (args) => {
Segment.trackWithProperties('GEO_TRACK_' + args.data.eventType, args);
});
Location.startGeofencingAsync(GEO_TRACK_LOCATION, regions)
.then(result => console.log(`${GEO_TRACK_LOCATION} started`));
Expected Behavior
App should wake up when entering or exiting a specified location and fire off an update.
Actual Behavior
No geofencing updates are sent when the app is killed/closed Works as expected when app is open/foreground/background
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (4 by maintainers)
Any updates on this? Seems like it makes the geofencing behavior fairly useless on iOS
This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem.