CLLocationManager.authorizationStatus() always CLAuthorizationStatus.NotDetermined with swift&objC app

a 夏天 提交于 2019-12-03 22:25:18
amb

Keep in mind that NSLocationAlwaysUsageDescription or NSLocationWhenInUseUsageDescription keys are now mandatory, so you should include that in your plist.

The only thing that you have to do is to add the Key "NSLocationWhenInUseUsageDescription" to your app info.plist then make a CLLocationManager requestWhenInUseAuthorization method and call it in the viewDidLoad.

As it happens with my objC app as well -- the one I KNOW works fine under ios7 -- I figured it should be a OS bug and reported it: #17128352

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