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

来源:互联网 发布:基于比较排序算法 编辑:程序博客网 时间:2024/04/29 21:43

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

[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

其他类似的一样。

0 1
原创粉丝点击