ios10的一些崩溃问题
1. 一打开App即闪退
具体操作环境:wifi下没问题,4G下出现崩溃
需要排查:各第三方SDK,更新到最新版本,特别是QQ SDK,
<pre><code>TencentOAuth *_tencentOAuth = [[TencentOAuth alloc] initWithAppId:kTencentAppID andDelegate:nil];</code></pre>老SDK下,TencentOAuth 的初始化在非wifi环境下会报错。
2. 访问相机,相册,联系人,麦克风报错
需要加上权限访问控制
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.
解决方法:在info.plist里添加一些key
<key>NSCameraUsageDescription</key>
<string>需要您的同意才能继续访问相机</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>需要您的同意才能继续访问相册</string>
<key>NSContactsUsageDescription</key>
<string>需要您的同意才能继续访问联系人</string>
<key>NSMicrophoneUsageDescription</key>
<string>需要您的同意才能继续访问麦克风</string>
3. Xcode8 最低支持ios8.0,想要支持7.x
在/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform路径下加入7.x的sdk
然后修改/Developer/SDKs/iPhoneOS.sdk下的SDKSettings.plist文件,在DefaultProperties->DEPLOYMENT_TARGET_SUGGESTED_VALUES节点里,添加7.0跟7.1的sdk选择配置
下载ios 7.x sdk