ios10 相冊相機閃退

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 NSPhotoLibraryUsageDescription key with a string value explaining to the user how the app uses this data.

修復方法:

在info.plist文件下添加

相機權限

<key>NSCameraUsageDescription</key>

<string>cameraDesciption</string>

相冊權限

<key>NSPhotoLibraryUsageDescription</key>

<string>photoLibraryDesciption</string>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章