1.问题
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.不难翻译,大体意思就是这个App缺少一个获取私有(敏感)数据的权限描述,需要我们在info.plist文件中必须含有一个名字叫做NSPhotoLibraryUsageDescription的值来解释为什么应用需要使用这个数据,没错,获取相册资源的键值就是NSPhotoLibraryUsageDescription
解决办法:
<key>NSPhotoLibraryUsageDescription</key><string>App需要您的同意,才能访问相册</string>
<key>NSCameraUsageDescription</key><string>App需要您的同意,才能访问相机</string>