iOS开发杂货铺

iOS 11 无法定位问题:This app has attem

2018-01-17  本文已影响1750人  荒野猎人2018

iPhone 升级到iOS 11后发现的定位功能不可用,通过调试发现异常,系统后台打印:

This app has attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain both NSLocationAlwaysAndWhenInUseUsageDescription and NSLocationWhenInUseUsageDescription keys with string values explaining to the user how the app uses this data

在info.plist加入NSLocationAlwaysAndWhenInUseUsageDescription和NSLocationWhenInUseUsageDescription之后问题解决,如图:


iOS11添加定位参数后显示.png

官方解释如下:


关于如何定位Apple的官方解释.png
上一篇下一篇

猜你喜欢

热点阅读