当使用iOS10使用相机时会出现崩溃
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.
有如下常用字段
-
NSContactsUsageDescription -> 通讯录
-
NSMicrophoneUsageDescription -> 麦克风
-
NSPhotoLibraryUsageDescription -> 相册
-
NSCameraUsageDescription -> 相机
-
NSLocationAlwaysUsageDescription -> 地理位置
-
NSLocationWhenInUseUsageDescription -> 地理位置
我们需要在info.plist中设置提醒,在iOS10之前默认就给设置了
<key>NSCameraUsageDescription</key>
<string>cameraDesciption</string>
<key>NSContactsUsageDescription</key>
<string>contactsDesciption</string>
<key>NSMicrophoneUsageDescription</key>
<string>microphoneDesciption</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>photoLibraryDesciption</string>