国内最全IT社区平台 联系我们 | 收藏本站
华晨云阿里云优惠2
您当前位置:首页 > php开源 > 综合技术 > iOS 解决iOS10相册、相机、麦克风等权限使用问题

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

来源:程序员人生   发布时间:2016-11-22 08:57:31 阅读次数:3423次

访问相册出现下面崩溃提示:

[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里面添加1个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

其他类似的1样。

生活不易,码农辛苦
如果您觉得本网站对您的学习有所帮助,可以手机扫描二维码进行捐赠
程序员人生
------分隔线----------------------------
分享到:
------分隔线----------------------------
关闭
程序员人生