app 启动时直接退出

APP启动时,显示启动画面,显示十多秒后直接退出。

ios系统有app启动时间限制,超过一定时间还未完成,系统会把程序kill掉,这样程序就crash。


https://developer.apple.com/library/ios/qa/qa1592/_index.html


A: Why does my application crash during launch unless I run it from Xcode?

iPhone OS uses a watchdog timer when applications are launched. If an application takes too long to complete its initial startup, the operating system terminates the application. Applications terminated for this reason will have the exception code 0x8badf00d and related information noted in the associated crash report:

Listing 1  Crash report excerpt.

Exception Type: 00000020
Exception Codes: 0x8badf00d
Highlighted Thread: 0

Application Specific Information:
com.yourcompany.yourapp failed to launch in time 
elapsed total CPU time (seconds): 11.120 (user 1.840, system 9.280), 59% CPU 
elapsed application CPU time (seconds): 2.160, 12% CPU

When Xcode launches an application, the watchdog timer is disabled to compensate for additional overhead that may be incurred when Xcode attaches the debugger. As a result, your application's long startup may initially escape your attention if you are exclusively testing by running from Xcode.

The best applications launch quickly, allowing the user to interact with the application as soon as possible. To provide a quality user experience, you should routinely evaluate and work to improve the launch time of your application. If considerable work must be done at launch, consider performing that work on a secondary thread and visually indicating the activity.





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值