react-native-background-geolocation: iOS continuous background geolocation not working- But works well with Android

Environment

  • Plugin version:
  • “react-native-background-fetch”: “^4.2.1”, “react-native-background-geolocation”: “^4.12.1”,
  • Platform: iOS
  • OS version: 16.6.1
  • Device manufacturer / model: iphone 14 Pro max
  • React Native version (react-native -v): “0.64.0”
  • Plugin config

BackgroundGeolocation.ready( { desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH, disableLocationAuthorizationAlert: true, distanceFilter: 10, stationaryRadius: 25, stopTimeout: 5, showsBackgroundLocationIndicator: true, debug: true, reset: false, logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE, logMaxDays: 1, stopOnTerminate: false, startOnBoot: true, heartbeatInterval: 60, enableHeadless: true, stopAfterElapsedMinutes: -1, preventSuspend: false, elasticityMultiplier: 1, }, state => { console.log( '- BackgroundGeolocation is configured and ready: ', state.enabled, ); }, );

Expected Behavior

On iOS, it will continuously receive location updates in the background mode.

Actual Behavior

Android is working perfectly fine both in the foreground and in the background. However, on iOS, it only receives updates with a 4-5-minute delay every time after coming out of stationary mode.

Steps to Reproduce

  1. kill application and test

Debug logs

Screenshot 2023-09-12 at 3 43 40 PM

About this issue

  • Original URL
  • State: open
  • Created 10 months ago
  • Comments: 26 (13 by maintainers)

Most upvoted comments

App is not crashing as it is already in killed state, service is running continuously, it is getting location data only after specific time period. It runs for sometime and then it goes to sleep and again gets started. And this happens continuously.

On simulator it works well. But on devices it shows gaps. We had been using your SDK since long time and it had been giving continuous tracking before for us. But suddenly it stopped giving continuous updates on production server where nothing is changed and this is happening on ios only.

So we are not able to understand the issue.