美文网首页iOS开发杂货铺
iOS 11 无法定位问题:This app has attem

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

作者: 荒野猎人2018 | 来源:发表于2018-01-17 22:17 被阅读1750次

    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

    相关文章

      网友评论

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

        本文链接:https://www.haomeiwen.com/subject/tkkpoxtx.html