更新到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 文件添加一个
NSPhotoLibraryUsageDescription
的 key,然后添加一个描述。
回想到上次提价AppStore遇到的很坑的问题,因使用位置权限说明不明确被拒绝,给予大家如下描述参考(参考的QQ):
@"请点击“允许”以允许访问。
若不允许,您将无法正常使用**等功能"