Blue banner "Your application uses your location" does not appear after exiting my application

My application uses the base location in the background, when the application is in the background and periodically sends GPS coordinates, the blue banner “Your application uses your location” is not displayed (for example, a Google map application). Any idea on what I might have missed?

+4
source share
2 answers

To show the blue bar, you must

1: Enable Background Location Updatesin target capabilities. Then set locationManager allowsBackgroundLocationUpdatesto YES;

2: Add NSLocationWhenInUseUsageDescriptionto file info.plist(8. 0+ asks for location). Then call the method requestWhenInUseAuthorizationnot method requestAlwaysAuthorization.

+5

, , .

0

All Articles