ios10相机等崩溃

作者: kevinLY | 来源:发表于2016-09-18 16:27 被阅读87次

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里加入(使用source code模式):
<key>NSCameraUsageDescription</key> <string>cameraDesciption</string><key>NSContactsUsageDescription</key><string>contactsDesciption</string><key>NSMicrophoneUsageDescription</key><string>microphoneDesciption</string><key>NSPhotoLibraryUsageDescription</key><string>photoLibraryDesciption</string>

实际项目中,按需修改:
<key>NSCameraUsageDescription</key> <string>拉近需要访问您的相机</string>

WechatIMG4.jpeg

<key>NSContactsUsageDescription</key><string>拉近需要访问您的通讯录</string>
<key>NSMicrophoneUsageDescription</key><string>拉近需要访问您的麦克风</string>
<key>NSPhotoLibraryUsageDescription</key><string>拉近需要访问您的相册</string>

不懂就药问

相关文章

网友评论

    本文标题:ios10相机等崩溃

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