Application Failed to Launch in Time(应用未能及时启动)
                            本文介绍了应用未能及时启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
                        
                        问题描述
如何诊断此错误?
Application Specific Information:
    MyApp failed to launch in time
    Elapsed total CPU time (seconds): 4913.443 (user 3868.270, system 1045.173), 56% CPU 
    Elapsed application CPU time (seconds): 0.010, 0% CPU
    Backtrace not available
    Unknown thread crashed with unknown flavor: 5, state_count: 1
    Binary Images:
    0x2fe00000 - 0x2fe26fff  dyld armv7  <a11905c8ef7906bf4b8910fc551f9dbb> /usr/lib/dyld
这是我的 didFinishLaunching 方法:
Here is my didFinishLaunching method:
#pragma mark -
#pragma mark Application lifecycle
    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
        if(getenv("NSZombieEnabled") || getenv("NSAutoreleaseFreedObjectCheckEnabled")) 
        {
            NSLog(@"NSZombieEnabled/NSAutoreleaseFreedObjectCheckEnabled enabled!");
        }
        // Override point for customization after application launch.
        [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(reachabilityChanged:) name: kReachabilityChangedNotification object: nil];
        //Check for connectivity
        internetReach = [[Reachability reachabilityForInternetConnection] retain];
        [internetReach startNotifer];
        [self updateInterfaceWithReachability: internetReach];
        [window addSubview:navigationController.view];
        [window makeKeyAndVisible];
        return YES;
    }
推荐答案
您可能在 AppDelegate 的 application:didFinishLaunching 方法中进行了大量设置工作.
You're probably doing a lot of setup work in your AppDelegate's application:didFinishLaunching method.
您应该确保该函数尽快退出.任何需要时间的设置工作(例如网络访问)都应该在您的应用程序中异步完成.在此过程中,您可以显示一个微调器以向用户指示应用程序正在加载.
You should make sure this function exits as soon as possible. Any setup-work that takes time (network access for example) should be done asynchronously in your application. While this is going on, you can show a spinner to indicate to the user that the application is loading.
这篇关于应用未能及时启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
				 沃梦达教程
				
			本文标题为:应用未能及时启动
				
        
 
            
        
             猜你喜欢
        
	     - 类似于 Mail.app 的 iPad 模态视图控制器? 2022-01-01
 - UITextView 内容插图 2022-01-01
 - GPS状态的广播接收器? 2022-01-01
 - URL编码Swift iOS 2022-01-01
 - 在 Iphone SDK 的导航栏上添加多个按钮 2022-01-01
 - Xcode 7.3 中带有 UILabel 的 UIStackView 2022-01-01
 - SetOnItemSelectedListener上的微调程序错误 2022-01-01
 - 如何在 iPhone 模拟器中重置 NSUserDefaults 数据? 2022-01-01
 - 使用自动布局向 UIScrollView 添加动态大小的视图 2022-01-01
 - 网上有没有好的 UIScrollView 教程? 2022-01-01
 
