我在我的应用中使用了Xamarin Forms 3.3。在iOS上调试应用程序测试时。
我的日志文件总是有两行:
2019-01-13 21:19:59.575 Marine.Mobile.iOS[2751:542039] Currently does not have Location permissions, requesting permissions
2019-01-13 21:19:59.599 Marine.Mobile.iOS[2751:542039] 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
中设置为Location Service
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Marine requires GPS to track cars and job orders</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Marine requires GPS to track cars and job orders</string>
但不能运行或调试程序。
无法显示项目Image的名称
和错误:Image Error
我只尝试在文件Info.plist
中使用以下代码
<key>NSLocationWhenInUseUsageDescription</key>
<string>Marine requires GPS to track cars and job orders</string>
=>项目可以运行调试。
然后,我试着不使用NSLocationWhenInUseUsageDescription
,将其替换为NSLocationWhenInUseUsageDescription
,但程序无法调试。
<key>NSLocationWhenInUseUsageDescription</key> <string>Marine requires GPS to track cars and job orders</string>
=>为什么代码无法将其添加到文件Info.plist
中:
请帮帮我!谢谢!
发布于 2019-01-21 04:46:03
试试这个:在YourProject.iOS中双击。选择Configuration并添加新配置。
https://stackoverflow.com/questions/54170153
复制相似问题