問題:一覺醒來规辱,很多客戶反映app不能定位了。查詢相關(guān)資料后發(fā)現(xiàn)是定位權(quán)限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.
*/
蘋果現(xiàn)在增加了一項(xiàng)新的隱私保護(hù)功能 NSLocationAlwaysAndWhenInUseUsageDeion,并且原有的 NSLocationAlwaysUsageDeion 被降級為 NSLocationWhenInUseUsageDeion碍岔。