简体   繁体   English

iOS 8.0 Swift请求位置权限requestAlwaysAuthorization不提示

[英]IOS 8.0 Swift Request Location Permission requestAlwaysAuthorization is not prompting

I had a problem on IOS Ask Request Permission for Location Usage in Always. 我在“始终”中的“ IOS询问位置使用的请求权限”时遇到问题。 IOS 8.0 Swift Request Location Permission requestAlwaysAuthorization is not prompting. IOS 8.0 Swift请求位置权限requestAlwaysAuthorization不提示。 I Add the NSLocationWhenInUseUsageDescription and NSLocationAlwaysUsageDescription and NSLocationAlwaysUsageDescription in info.plist. 我在info.plist中添加了NSLocationWhenInUseUsageDescriptionNSLocationAlwaysUsageDescriptionNSLocationAlwaysUsageDescription Then called the method locationManager?.requestAlwaysAuthorization() . 然后调用方法locationManager?.requestAlwaysAuthorization() But No Prompting Happened. 但是没有提示发生。 Need to know whats I done mistake 需要知道我做错了什么

If you are sure about the permission added in your info.plist then i am suggesting you the following steps, Hope they May Help 如果您确定在info.plist中添加了权限,那么我建议您执行以下步骤,希望他们可以为您提供帮助

1)Delete App from Device 2)Reset you privacy setting by 1)从设备删除应用程序2)通过重置您的隐私设置

Go to Settings > General > Reset > Reset Location & Privacy 转到设置>常规>重置>重置位置和隐私

If this not work then you should check again your keys in info.plist You might want cross check with keys at doc from Here : https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html 如果这不起作用,那么您应该再次在info.plist中检查您的密钥。您可能想在此处通过doc的密钥进行交叉检查: https : //developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles /CocoaKeys.html

Hope this may help you. 希望这对您有帮助。 Good luck Ahead 祝你好运

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM