-->

Blue banner “Your app is using your location” is n

2019-06-27 04:20发布

问题:

My application is using core location in background mode, when app is in background mode and sending GPS coordinates periodically, the blue banner "Your app is using your location" is not showing (like google map app for example). Any idea of what I could have missed ?

回答1:

To show blue bar, you should

1: Enable Background Location Updates in target Capabilities. Then set locationManager allowsBackgroundLocationUpdates to YES;

2: Add NSLocationWhenInUseUsageDescription in info.plist file (8.0+ ask for location). Then call requestWhenInUseAuthorization method not requestAlwaysAuthorization method.



回答2:

It only shows for applications registered for when in use location updates.