[iOS]有关iOS10及Xcode8的相关适配文章收集

来源:互联网 发布:淘宝等级权限 编辑:程序博客网 时间:2024/06/06 16:29

1、http://mp.weixin.qq.com/s?__biz=MjM5OTM0MzIwMQ==&mid=2652547554&idx=3&sn=1ede1af394bdc5b5eff99e54e3905319&chksm=bcd2ecec8ba565fa443a0a22f4c499235c34b33286b66ae6082c874703add0e1fbbe81e78e2b&scene=0#rd

2、http://mp.weixin.qq.com/s?__biz=MjM5OTM0MzIwMQ==&mid=2652547529&idx=1&sn=bdbca712415cc6cc68e4f04c855e8441&scene=0#rd



持续更新》》》2016.11.9

iOS10系统下调用系统相册、相机功能,或者苹果健康都会遇到闪退的情况,
调用系统相册报错描述如下:

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

解决办法(fix method):
info.plist —Source Code中添加
UsageDescription相关的key, 描述字符串自己随意填写就可以,但是一定要填写,不然会引发包无效的问题,导致上传打包后构建版本一直不显示

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


文/槑头脑(简书作者)
原文链接:http://www.jianshu.com/p/90d5323cf510
著作权归作者所有,转载请联系作者获得授权,并标注“简书作者”。

0 0
原创粉丝点击