美文网首页
iOS 10权限崩溃问题

iOS 10权限崩溃问题

作者: loghm | 来源:发表于2017-03-17 22:26 被阅读55次

最近在做一个项目的更新上架,上传到苹果审核,因为启动时候会崩溃导致被拒。我在本地进行测试时,都没有问题。(事后发现我只有用iOS 10一下版本进行测试,没有进行测试iOS 10真机)前后左右折腾了一段时间,期间也搭建过ipv6环境进行测试,最后发现是在iOS 10系统的权限出现问题。

首先,先看一下苹果发过来的crash log

crashlog.png

???完全看不懂,都是一些内存地址,我试过使用symbolicatecrash进行解析,仍然是一些内存地址,完全定位不到具体的崩溃函数。

我仔细看了苹果审核发过来的信息

Your app crashes on iPad running iOS 10.2.1 when we:
launch the app
Next Steps
Please review your app on iPad to ensure that it runs without crashing. Also, please follow the steps to reproduce the issue when running your app on iPad configured for real world use.
For new apps, uninstall all previous versions of your app from a device, then install and follow the steps to reproduce. For updates, install the new version as an update to the previous version, then install and follow the steps to reproduce.

意思是说,我的应用在运行在ipad(iOS 10.2.1)上面,启动时候会发生闪退的情况。下面说了,解决的建议。。

刚开始我以为可能是ipad的布局问题导致的闪退,特定拿了ipad的模拟器(没有ipad)进行测试,没有问题,之后,更新了afn,搭建ipv6环境进行测试,都是没有问题的。我才意识到,我的应用还没有在iOS 10.2.1上面进行测试。于是,我更新了iphone系统,进行测试,居然崩溃了!报了以下错误:

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.

原来是iOS 10系统的权限问题导致的崩溃,汗😅,之后的解决方法就很简单了。只需要在info.plist文件中,添加即可。

Paste_Image.png

这里也提供一下其他的权限key,如果你在应用中有使用其中的功能,不要忘记添加这些key哦。

<key>NSCameraUsageDescription</key>    
<string>cameraDesciption</string>
<key>NSContactsUsageDescription</key>    
<string>contactsDesciption</string>
<key>NSMicrophoneUsageDescription</key>    
<string>microphoneDesciption</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>LibraryUsageDescription</string>

相关文章

  • "This app has crashed because it

    参考文章:iOS中 iOS10 权限崩溃问题 韩俊强的CSDN博客

  • 升级xcode 8 兼容iOS 10后的一些变动

    一、隐私权限以及相关设置 iOS 10 开始对隐私权限更加严格,如果你不设置就会直接崩溃,现在很多遇到崩溃问题了,...

  • iOS 10权限崩溃问题

    最近在做一个项目的更新上架,上传到苹果审核,因为启动时候会崩溃导致被拒。我在本地进行测试时,都没有问题。(事后发现...

  • iOS 10 隐私权限和推送适配

    一、iOS 10 隐私权限配置 在iOS 10中,访问隐私权限需要在info.plist文件中进行配置,否则会崩溃...

  • iOS 10 与Xcode 8 新特性

    iOS 10 1. 访问权限崩溃问题 如果打开APP后点击有关权限访问后直接Crash了则需要在需要在info.p...

  • iOS10 权限崩溃问题

    手机升级了 iOS10 Beta,然后用正在开发的项目 装了个ipa包,发现点击有关 权限访问 直接Crash了,...

  • iOS10 权限崩溃问题

    今天 手机升级了 iOS10 Beta,然后用正在开发的项目 装了个ipa包,发现点击有关 权限访问 直接Cras...

  • iOS10 权限崩溃问题

    iOS10上,若你的项目访问了隐私数据,比如:相机,相册,通讯录等,app会直接Crash了,这是因为iOS10对...

  • iOS10 常见权限崩溃问题

    http://blog.sina.com.cn/s/blog_75569dd50102x09d.html

  • iOS10 App权限问题崩溃

    根据控制台的提示,我们需要在plist文件添加相应的字段 相机权限添加key字段NSCameraUsageDesc...

网友评论

      本文标题:iOS 10权限崩溃问题

      本文链接:https://www.haomeiwen.com/subject/gsvsnttx.html