StackOverFlow  定位:导航栏 顶部蓝条

Location blue bar appears when not updating location
Originator:
keithbsmiley

Number:
rdar://20764660
Date Originated:
30-Apr-2015 09:49 AM

When the background mode for locations is enabled, and the CLLocationManager has requestWhenInUseAuthorization access, the blue location bar appears after exiting the app. This occurs even when stopUpdatingLocation has been called in either applicationDidEnterBackground or applicationWillResignActive.

Steps to reproduce:

  1. Enable the background mode for location access
  2. requestWhenInUseAuthorization
  3. Start updating location
  4. Stop updating location in either UIApplicationDelegate method
  5. Put the app in the background

Expected results:The blue location bar never appears since we are no longer accessing the user's location.

Actual results:Note the blue location bar appears immediately and disappears after a few seconds.

Notes:This combination of things makes sense when we don't always want to access the user's location in the background, but do other times (such as when the user wants directions). You can also reproduce this behavior using Google Maps on iOS.

Comments
Facing the exact same situation. Please let us know if you hear anything from Apple

By mihirpmehta at June 19, 2015, 6:07 a.m. (reply...)

https://stackoverflow.com/questions/27132698/ios8-blue-bar-is-using-your-location-appears-shortly-after-exiting-app

By keithbsmiley at April 30, 2015, 4:54 p.m. (reply...)

Example project: https://github.com/Keithbsmiley/radars/tree/master/LocationBlueBar

By keithbsmiley at April 30, 2015, 4:52 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!

最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容