iOS: how to trigger a user force-quit crash on iPh

2019-06-08 22:27发布

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?

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

标签: iphone ios crash
1条回答
We Are One
2楼-- · 2019-06-08 23:29

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

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

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.

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

enter image description here

查看更多
登录 后发表回答