iOS10系統(tǒng)下調(diào)用系統(tǒng)相冊(cè)、相機(jī)功能,遇到閃退的情況,描述如下:
This app has crashed because it attempted to access privacy-sensitive data without a usage description.The app's Info.plist must contain an NSPhotoLibraryUsageDescription key with a string value explaining to the user how the app uses this data.
修復(fù)方法:
在info.plist文件下添加
相機(jī)權(quán)限
<key>NSCameraUsageDescription</key>
<string>cameraDesciption</string>
相冊(cè)權(quán)限
<key>NSPhotoLibraryUsageDescription</key>
<string>photoLibraryDesciption</string>