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

2019-06-27 04:33发布

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 ?

2条回答
Fickle 薄情
2楼-- · 2019-06-27 04:43

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

查看更多
Ridiculous、
3楼-- · 2019-06-27 04:49

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.

查看更多
登录 后发表回答