且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

请求使用授权显示没有提示

更新时间:2023-11-03 15:45:22

4 ios 8:需要在info.plist中配置它,

4 ios 8: Need configure it in info.plist,

键名为NSLocationAlwaysUsageDescription值为

key name as "NSLocationAlwaysUsageDescription" value as ""

密钥名称为NSLocationWhenInUseUsageDescription值为

key name as "NSLocationWhenInUseUsageDescription" value as ""

当您致电:

[_locationManager requestWhenInUseAuthorization];

将自动提示。

测试使用模拟器,您可以单击重置内容和设置...并再次提示。

Testing with simulator, you can click "Reset content and settings..." and prompt again.

这是一个演示: https://github.com/JNYJ/001PGWUcurrentWULF