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.