iOS之报错The app's Info.plist must contain an xxx key with a string value explaining

来源:互联网 发布:linux cp拷贝多个文件 编辑:程序博客网 时间:2024/05/21 19:42

最近升级了XCode 8 ,使用相机报错:

[access] This app has crashed because it attempted to access privacy-sensitive data without a usage description.  The app's Info.plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data.


解决方法:在Info.plist配置NSCameraUsageDescription




大概统计了一下需要加的一些字段列在下面:

  • NSContactsUsageDescription -> 通讯录

  • NSMicrophoneUsageDescription -> 麦克风

  • NSPhotoLibraryUsageDescription -> 相册

  • NSCameraUsageDescription -> 相机

  • NSLocationAlwaysUsageDescription -> 地理位置

  • NSLocationWhenInUseUsageDescription -> 地理位置


转自:http://blog.csdn.net/zp511253886/article/details/52584210

阅读全文
0 0