Required Reading
Plugin Version
4.18.9
Mobile operating-system(s)
Device Manufacturer(s) and Model(s)
Client-reported issue — exact device model not yet confirmed. Will follow up with iPhone model once collected from the affected user.
Device operating-systems(s)
iOS version not yet confirmed — app supports iOS 15.0+ (Podfile platform target). Will update once collected from the affected user's device.
React Native / Expo version
React Native 0.72.1 (bare RN, not Expo)
What do you require assistance about?
We use react-native-background-geolocation in our production app (a live
safety-monitoring / location-tracking app) and our clients are reporting
significant battery drain caused by continuous background location on iOS.
Important requirement: this is a safety-monitoring app, so tracking behavior
must continue working exactly as it does today — continuous background
location even when the app is killed/terminated, reliable reporting while
stationary and moving, and no gaps in coverage. We are only looking for
configuration/approach changes that reduce battery consumption WITHOUT
reducing tracking reliability, frequency, or accuracy in any way that a user
or their monitor would notice. If a battery improvement requires trading off
tracking reliability, please flag that clearly as a trade-off rather than a
straightforward fix, so we can make that call knowingly.
Specific questions:
- preventSuspend: true keeps the app alive in the background on iOS (we
believe via a silent audio session — our Info.plist UIBackgroundModes
includes "audio"). Is this the primary battery cost in our setup? What's
the recommended alternative for an app that must keep reporting location
while backgrounded?
- heartbeatInterval: 15 fires indefinitely every 15s even while stationary —
is this itself a significant battery cost separate from GPS accuracy?
What interval would you recommend?
- Would you recommend changing desiredAccuracy, distanceFilter, or
stationaryRadius for our use case, and what values?
- Any other iOS-specific config changes to reduce battery use without
losing reliable background/killed-app tracking?
[Optional] Plugin Code and/or Config
BackgroundGeolocation.ready({
desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,
distanceFilter: 10,
stopOnTerminate: false,
startOnBoot: true,
batchSync: false,
autoSync: false,
preventSuspend: true,
pausesLocationUpdatesAutomatically: false,
stationaryRadius: 25,
locationAuthorizationRequest: "Always",
heartbeatInterval: 15,
useSignificantChangesOnly: false,
enableHeadless: true,
});
// onHeartbeat sends the cached event.location — no forced fresh GPS fix:
BackgroundGeolocation.onHeartbeat((event) => {
if (event?.location?.coords) {
sendLocationToServer(event.location);
}
});
// Info.plist UIBackgroundModes: audio, fetch, location, processing, remote-notification
[Optional] Relevant log output
Not yet collected — logLevel is currently LOG_LEVEL_OFF in production (no
verbose logging enabled). Can enable LOG_LEVEL_VERBOSE and send Xcode console
logs / BackgroundGeolocation.emailLog() output from an affected device if
needed for diagnosis.
Required Reading
Plugin Version
4.18.9
Mobile operating-system(s)
Device Manufacturer(s) and Model(s)
Client-reported issue — exact device model not yet confirmed. Will follow up with iPhone model once collected from the affected user.
Device operating-systems(s)
iOS version not yet confirmed — app supports iOS 15.0+ (Podfile platform target). Will update once collected from the affected user's device.
React Native / Expo version
React Native 0.72.1 (bare RN, not Expo)
What do you require assistance about?
We use react-native-background-geolocation in our production app (a live
safety-monitoring / location-tracking app) and our clients are reporting
significant battery drain caused by continuous background location on iOS.
Important requirement: this is a safety-monitoring app, so tracking behavior
must continue working exactly as it does today — continuous background
location even when the app is killed/terminated, reliable reporting while
stationary and moving, and no gaps in coverage. We are only looking for
configuration/approach changes that reduce battery consumption WITHOUT
reducing tracking reliability, frequency, or accuracy in any way that a user
or their monitor would notice. If a battery improvement requires trading off
tracking reliability, please flag that clearly as a trade-off rather than a
straightforward fix, so we can make that call knowingly.
Specific questions:
believe via a silent audio session — our Info.plist UIBackgroundModes
includes "audio"). Is this the primary battery cost in our setup? What's
the recommended alternative for an app that must keep reporting location
while backgrounded?
is this itself a significant battery cost separate from GPS accuracy?
What interval would you recommend?
stationaryRadius for our use case, and what values?
losing reliable background/killed-app tracking?
[Optional] Plugin Code and/or Config
[Optional] Relevant log output