1. 调用相机,通讯录,相册crash掉了。提示:
This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSPhotoLibraryUsageDescrip tion key with a string value explaining to the user how the app uses this data.
意思是对于用户的敏感信息需要添加描述说明;
解决方案:
在info.plist中加入
<key>NSCameraUsageDescription</key>
<string>cameraDesciption</string>
<key>NSContactsUsageDescription</key>
<string>contactsDesciption</string>
<key>NSMicrophoneUsageDescription</key>
<string>microphoneDesciption</string>
2.当用户在广告设置中,将广告追踪关闭后,获取idfa为空问题。
解决方案:
1.判断idfa是否可以追踪:
[[ASIdentifierManager sharedManager] isAdvertisingTrackingEnabled]
2.如果可用或缺idfa;
3,如果不可用,取idfav并保存到keychain。