Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
Addresses several reliability issues with location tracking on iOS:
GPSSecureStorage
In order to improve reliability while the app is backgrounded, this PR configures the location provider with
saveBatteryOnBackground: false
. This simply enables default location updates while the app is backgrounded. From some initial testing this didn't appear to be too significant an energy drain, but if further testing reveals battery usage is an issue then this can be changed totrue
. If set totrue
, location updates will behave the same when backgrounded as when terminated, which has some serious limitations (see note below).Linked issues:
https://pathcheck.atlassian.net/browse/SAF-257
How to test:
Ensure locations are more reliably logged while the app is
Note that once the app is terminated we have to rely on coarse location updates from either region (geofence) events or significant location changes. At best this means our app will be woken up to receive location updates every ~100m.