您的位置:首页 > 移动开发 > IOS开发

iOS 解决iOS10相册、相机、麦克风等权限使用问题

2016-09-19 17:18 477 查看
访问相册出现下面崩溃提示:

[access] 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里面添加一个String字段 NSPhotoLibraryUsageDescription ,Value可随便,它将显示在弹出来的用户权限选择框上。

同理使用相机时候:

[access] This app has crashed because it attempted to access privacy-sensitive data without a usage description.  The app's Info.plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data.


添加NSCameraUsageDescription字段和value

麦克风:

[access] This app has crashed because it attempted to access privacy-sensitive data without a usage description.  The app's Info.plist must contain an NSMicrophoneUsageDescription key with a string value explaining to the user how the app uses this data.


添加NSMicrophoneUsageDescription 和value

其他类似的一样。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  ios