iOS:如何触发用户在iPhone上强制退出崩溃? [英] iOS: how to trigger a user force-quit crash on iPhone?

查看:729
本文介绍了iOS:如何触发用户在iPhone上强制退出崩溃?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

WWDC视频(WWDC 2010会话317 - 了解iPhone操作系统的崩溃报告)说,崩溃日志中的错误代码0xdeadfa11意味着用户强制退出崩溃,但我从来没有见过这个错误代码。
如何触发用户强制退出崩溃?

WWDC video(WWDC 2010 Session 317 - Understanding Crash Reports on iPhone OS) says error code 0xdeadfa11 in crash log means a user force-quit crash, but I've never seen this errer code. How to trigger a user force-quit crash?

编辑:
我想知道手动方式和程序化方式:P


I would like knowing both the manual way and programmatical way :P

推荐答案

显然没有程序化的方式来做,因为异常类型是基于用户活动。

Apparently there is no programmatical way to do it because the exception type is based on user activity.

为了模拟崩溃,Apple文档如下所示:

In order to simulate the crash the apple docs says as follow


异常代码0xdeadfa11指示应用程序已被用户强制退出。强制退出发生在用户首先按住开/关按钮,直到出现滑动到电源关闭,然后按住主页按钮。这是合理的假设,用户已经这样做,因为应用程序已经变得无响应,但不能保证 - 强制退出将工作在任何应用程序。

The exception code 0xdeadfa11 indicated that an application has been force quit by the user. Force quits occur when the user first holds down the On/Off button until "slide to power off" appears, then holds down the Home button. It's reasonable to assume that the user has done this because the application has become unresponsive, but it's not guaranteed - force quit will work on any application.

我在iPhone 5(iOS 7)设备上模拟了这个工作正常。

I have simulated this on iphone 5 (iOS 7) device and works fine.

>

这篇关于iOS:如何触发用户在iPhone上强制退出崩溃?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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