问题:一觉醒来,很多客户反映app不能定位了。查询相关资料后发现是定位权限API有更新。
解决方法:info.plist中同时添加NSLocationAlwaysAndWhenInUseUsageDeion和NSLocationWhenInUseUsageDeion。
原因:
/*
* Either the NSLocationAlwaysAndWhenInUseUsageDeion key or both the
* NSLocationAlwaysUsageDeion and NSLocationWhenInUseUsageDeion
* keys must be specified in your Info.plist; otherwise, this method will do
* nothing, as your app will be assumed not to support Always authorization.
*/
苹果现在增加了一项新的隐私保护功能 NSLocationAlwaysAndWhenInUseUsageDeion,并且原有的 NSLocationAlwaysUsageDeion 被降级为 NSLocationWhenInUseUsageDeion。