Our app gets background location updates and has been working well right up to, and including iOS 16.3.1.
However, testing with iOS 16.4 we are finding that background location updates stop shortly after they start. I have spoken with other developers and they’re noticing the same thing.
Anyone else using background location updates finding this to be a problem?
The issue that is described here due to the changes with iOS 16.4 (and above) which affect the behavior of apps tracking location in the background.
Beginning in iOS 16.4, apps calling both startUpdatingLocation() AND startMonitoringSignificantLocationChanges() may get suspended in the background if they are specifying low accuracy and distance filtering in the location manager settings.
If your app needs only low accuracy locations of kCLLocationAccuracyKilometer and up, use startMonitoringSignificantLocationChanges() for that purpose instead.
If your app requires continuous high accuracy locations in the background, you must set the following location manager properties:
- allowsBackgroundLocationUpdates must be set to TRUE or YES
- distanceFilter must not be set, or set to kCLDistanceFilterNone
- desiredAccuracy must be kCLLocationAccuracyHundredMeters or better. If you’re using numeric values, it must be set to less than 1000 meters
Alternatively you can turn on the location indicator which will avoid the issue. You can do this by setting
- showsBackgroundLocationIndicator to TRUE or YES
If you implement the above changes in your app, its location update behavior will be similar to behavior prior to iOS 16.4. Without these changes, your app may not be able to receive continuous background location updates.