Xcode 8.0 GM iPhone模拟器崩溃(iOS 10) [英] Crash on Xcode 8.0 GM iPhone Simulator (iOS 10)

查看:375
本文介绍了Xcode 8.0 GM iPhone模拟器崩溃(iOS 10)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在真实设备上运行我的项目时,一切正常。

When I run my project on real device , everything works fine.

但是当我尝试在模拟器(iOS 10,iPhone 7和iPhone 6)上运行它时,应用程序崩溃,调试器输出中没有调试器消息。

But when I try to run it on the simulators(iOS 10,iPhone 7 && iPhone 6) ,the app crashed and no debugger messages in the Debugger Output.

崩溃的线程看起来像这样

The crashed Thread look like this

我想知道


TCC` CRASHING_DUE_TO_PRIVACY_VIOLATION

是指,以及如何解决问题?

means , and how to fix the problem?

推荐答案

您使用的是需要用户批准的功能(如相机,位置等)吗? TCC处理对此类资源的访问以及 __ CRASHING_DUE_TO_PRIVACY_VIOLATION __ 中的崩溃通常意味着您未满足使用该功能的要求。

Are you using a feature that requires user approval (like Camera, Location, etc)? TCC handles access to such resources and a crash in __CRASHING_DUE_TO_PRIVACY_VIOLATION__ usually means you aren't fulfilling the requirements to use that feature.

确保您拥有Info.plist文件中任何这些功能的使用说明密钥。 iOS 10现在绝对要求您提供以下描述:

Make sure you have the usage description key for any of those features in your Info.plist file. iOS 10 now absolutely requires you supply descriptions such as:

<key>NSCameraUsageDescription</key>
<string>For taking selfies!</string>

由于您之前已获得许可,因此可能正在您的设备上运行。如果您删除应用程序并等待24小时(或安装在之前从未安装过应用程序的其他设备上),您可能会在设备上看到相同的内容。 (不同的服务对于权限是否快速消失或保存一段时间以允许重新安装有不同的策略。)

It is probably working on your device because you previously granted permission. If you delete the app and wait 24 hours (or install on a different device that has never had the app installed before) you'd probably see the same thing on device. (Different services have different policies for whether permission disappears quickly or is saved for a while to allow for reinstalls).

更新:

有一个不错developer.apple.com 上的技术问答页面,描述了需要使用说明的框架,并列出了每个框架和所涉及的类/函数/选择器的相关密钥。

There is a nice Technical Q&A page on developer.apple.com that describes the frameworks that require a usage description and lists the relevant key(s) for each framework and the class/function/selector(s) involved.

这篇关于Xcode 8.0 GM iPhone模拟器崩溃(iOS 10)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆