bluebar stays forever even if stopupdating is called in iOS 11

爷,独闯天下 提交于 2019-12-23 03:54:10

问题


I am accessing location services as 'always', i know all the changes made by apple in iOS 11. i updated my plist as required( added new key). I calling stopUpdatingLocation as soon as application goes to the background, but this blue still stays there saying your application is using location in the background. Top of that filled location icon in status bar changes to outlined location icon also. I am using Mapbox SDK as well. Is it a bug with iOS 11 or am i missing something? Just to give background information, i am fully aware how location services works. i tried almost all solutions to remove that blue bar, but it seems it is not happening.

I tried self.locationManager.allowsBackgroundLocationUpdates = false, self.locationManager = nil, self.locationManager.delegate = nil but nothing is helping.

It will be great if anyone can help me with this.


回答1:


iOS 11 Beta release 5 has removed the unnecessary and intrusive Blue banner that displays for apps that used the location of the iPhone. Displaying the Blue bar for background location use is left to the app developer through a property.

@property(assign, nonatomic) BOOL showsBackgroundLocationIndicator

The users of the apps with location features are prompted to allow location permission first at the time of installing an app and then periodically prompted for apps that use location in the background continuously. The location use indicator arrow with three different shades is another mechanism for users to know if the location service is in use. Therefore an always appearing blue banner is unnecessary and Apple has recognized it.



来源:https://stackoverflow.com/questions/45109984/bluebar-stays-forever-even-if-stopupdating-is-called-in-ios-11

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!