ios 隐私数据访问问题

Bug One:
This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSContactsUsageDescription key with a string value explaining to the user how the app uses this data.
 
意思是说:你需要在info.plist文件 添加一个“NSContactsUsageDescription ”的Key,Value添加一个描述。
 
 

解决办法:设置info.plist文件权限设置就行了。
1,在项目中找到info.plist文件,右击有个 Open As,以Source Code 的形式打开
2,分别复制 以下 Value 和Key,Key 一定不能错,Value 貌似可以随便填写

 
NSPhotoLibraryUsageDescription 
App需要您的同意,才能访问相册 
 
NSCameraUsageDescription 
App需要您的同意,才能访问相机 
 
NSMicrophoneUsageDescription 
App需要您的同意,才能访问麦克风 
 
NSLocationUsageDescription 
App需要您的同意,才能访问位置 
 
NSLocationWhenInUseUsageDescription 
App需要您的同意,才能在使用期间访问位置 
 
NSLocationAlwaysUsageDescription 
App需要您的同意,才能始终访问位置 
 
NSCalendarsUsageDescription 
App需要您的同意,才能访问日历 
 
NSRemindersUsageDescription 
App需要您的同意,才能访问提醒事项 
 
NSMotionUsageDescription App需要您的同意,才能访问运动与健身 
 
NSHealthUpdateUsageDescription 
App需要您的同意,才能访问健康更新  
 
NSHealthShareUsageDescription 
App需要您的同意,才能访问健康分享 
 
NSBluetoothAlwaysUsageDescription 
App需要您的同意,才能访问蓝牙 
 
NSAppleMusicUsageDescription 
App需要您的同意,才能访问媒体资料库

 

你可能感兴趣的:(ios)