应用程序特定信息:应用程序无法及时启动(iOS)?

这是我的一个崩溃报告的顶部。 是否有任何苹果公司确定的应用程序启动超时限制? 任何常见的解决方法如果是这样?

Elapsed total CPU time (seconds): 13.700 (user 8.580, system 5.120), 67% CPU Elapsed application CPU time (seconds): 6.180, 30% CPU 

在iPhone 3G上。

我必须分开/延迟我的启动任务也许…

我认为它必须在5秒(或10秒)内启动,否则iPhone会认为它已经崩溃。

尽量避免在启动时在主线程上加载大量内容。 如果你需要加载大量的东西在后台线程上,像这样:

 - (void)startLoading { //call this in your app delegate instead of setting window.rootViewController to your main view controller //you can show a UIActivityIndiocatorView here or something if you like [self performSelectorInBackground:@selector(loadInBackground)]; } - (void)loadInBackground { //do your loading here //this is in the background, so don't try to access any UI elements [self performSelectorOnMainThread:@selector(finishedLoading) withObject:nil waituntilDone:NO]; } - (void)finishedLoading { //back on the main thread now, it's safe to show your view controller window.rootViewController = viewController; [window makeKeyAndVisible]; }