I’m running into the following problem with iOS 14.0 previously - with background location permission I could:
- Register for iBeacon region monitoring
- Kill the app from the app switcher
- Tap the screen and see the app relaunched in the console.
- App is running but is not in the app switcher
Retested with iOS14, without precise location my app is no longer being woken up from being terminated from the app switcher.
Re-enabled precise location permission and everything works as before.
What do I need to do to enable the background app to wake up for the iBeacon region without precise location permission?
Or
How do I detect that the precise location permission is missing and notify the user that the app will not work as expected?
The Precise Location switch is new to iOS 14, and the specifics of what happens when user switch it to off are unfortunately not well documented by Apple. Here is a summary based on experimentation:
With Precise Location Enabled/Disabled:
When precise location is disabled, lat/lon location updates to CoreLocation will be degraded to that provided by kCLAccuracyReduced similar to 3km accuracy provided by cell tower data.
Ranging and Monitoring of iBeacons is blocked -- delegate method callbacks do not get made, and apps will not be launched in the background. Nearby Interaction ranging is blocked.
These effects take effect immediately when you turn off Precise Location. You can see this yourself by looking at logging from your app while it is running, then going to settings to turn off Precise Location and seeing the behavioral changes.
Unfortunately, there is nothing you can do to force iOS to give you beacon or other location updates when the user has disabled Precise Location. The best you can do is detect that the user has done this (use code like below), and then prompt the user to change this in settings so your app works properly.