Open Sameer98700 opened 1 day ago
Are you testing in the iOS simulator with “Freeway Drive”?
Yess
On Sat, 26 Oct 2024 at 8:11 PM, Chris Scott @.***> wrote:
Are you testing in the iOS simulator with “Freeway Drive”?
— Reply to this email directly, view it on GitHub https://github.com/transistorsoft/react-native-background-geolocation/issues/2190#issuecomment-2439605879, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3DEOKQBLNVWVEI7IOQQAT3Z5OS2HAVCNFSM6AAAAABQUS43YKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZZGYYDKOBXHE . You are receiving this because you authored the thread.Message ID: <transistorsoft/react-native-background-geolocation/issues/2190/2439605879 @github.com>
And you’re saying you don’t see debug notifications appear after terminating the app while simulating location with “Freeway Drive”?
Yes, previously it is working fine in 4.1.1
On Sat, 26 Oct 2024 at 8:39 PM, Chris Scott @.***> wrote:
And you’re saying you don’t see debug notifications appear after terminating the app while simulating location with “Freeway Drive”?
— Reply to this email directly, view it on GitHub https://github.com/transistorsoft/react-native-background-geolocation/issues/2190#issuecomment-2439615736, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3DEOKQN2SKVOHPDF4W44YLZ5OWD7AVCNFSM6AAAAABQUS43YKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZZGYYTKNZTGY . You are receiving this because you authored the thread.Message ID: <transistorsoft/react-native-background-geolocation/issues/2190/2439615736 @github.com>
Show me logs of your app launching in XCode.
Your Environment
react-native -v
): 0.74.4Plugin config
React.useEffect(() => {
BackgroundGeolocation.deviceSettings.showIgnoreBatteryOptimizations();
// Setup geofence event listener BackgroundGeolocation.onGeofence(async geofence => { console.log('Geofence event:', geofence);
// Check if exiting Geofence A if (geofence.action === 'EXIT' && geofence.identifier === 'GEOFENCE_A') { console.log('Exiting Geofence A. Sending location to server...');
} });
// Listen to location updates BackgroundGeolocation.onLocation(handleLocationUpdate, error => { console.log('[BackgroundGeolocation] Location error:', error); });
// Initialize background geolocation and fetch initBackgroundGeolocation(); initBackgroundFetch();
// Cleanup on unmount return () => { // BackgroundGeolocation.removeListeners(); }; }, []);
const initBackgroundGeolocation = async () => {
BackgroundGeolocation.ready({ reset: true, desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH, distanceFilter: 50, stationaryRadius: 50, logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE, debug: true, activityRecognitionInterval: 1000, stopTimeout: 60, disableMotionActivityUpdates: false, disableElasticity: true, startOnBoot: true, heartbeatInterval: 60, enableHeadless: true, stopOnTerminate: false, desiredOdometerAccuracy: 10, allowIdenticalLocations: false, autoSync: true, autoSyncThreshold: 0, batchSync: true, maxBatchSize: 10, maxDaysToPersist: 2, foregroundService: true, locationAuthorizationRequest: 'Always', geofenceInitialTriggerEntry: true, geofenceModeHighAccuracy: true, notification: { title: 'Location Tracking', text: 'Tracking location in the background', color: '#ff00ff', }, }).then(state => { BackgroundGeolocation.start(); }); };
Expected Behavior
Actual Behavior
Steps to Reproduce
1. 2. 3. 4.
Context
I updated to the latest version 4.17.4 in Android it is working fine but in ios BackgroundGeoLocation.onLocation function does not fire when the app is closed. previously version 4.1.1 BackgroundGeoLocation.onLocation worked in ios
Note -- I added in the index.js file
Debug logs
Logs
``` PASTE_YOUR_LOGS_HERE ```