This app has crashed because it attempted to access privacy-sensitive data without a usage descripti
运行环境
XCode 8.2.1
问题描述
当调取相册的时候APP崩溃并显示标题的错误: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.
问题分析
iOS进入10时代之后在Info.plist需要加入NSPhotoLibraryUsageDesciption这个key,value值是一个string值用来描述APP将如何描述这个数据将如何使用。
解决方案
在Info.plist文件中加入NSPhotoLibraryUsageDesciption即可。
本文来自博客园,作者:MrYu4,转载请注明原文链接:https://www.cnblogs.com/MrYU4/p/15778894.html