更新时间: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.