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.
意思是說(shuō):你需要在info.plist文件 添加一個(gè)“NSPhotoLibraryUsageDescription ”的Key,Value添加一個(gè)描述。
1,在項(xiàng)目中找到info.plist文件,右擊有個(gè) Open As,以Source Code 的形式打開(kāi)
2,分別復(fù)制 以下 Value 和Key,Key 一定不能錯(cuò),Value 貌似可以隨便填寫(xiě)
相機(jī)權(quán)限描述:
<key>NSCameraUsageDescription</key><string>cameraDesciption</string>
通信錄:
<key>NSContactsUsageDescription</key><string>contactsDesciption</string>
麥克風(fēng):
<key>NSMicrophoneUsageDescription</key><string>microphoneDesciption</string>
相冊(cè):
<key>NSPhotoLibraryUsageDescription</key><string>photoLibraryDesciption</string>