0
我在的applicationDidFinishLaunching检查网络的可达性:申请未能及时启动,即使有后台线程
[self performSelectorInBackground:@selector(performReachabilityCheck) withObject:nil];
后台线程
-(void)performReachabilityCheck{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
internetReach = [[Reachability reachabilityForInternetConnection] retain];
[internetReach startNotifer];
[self updateInterfaceWithReachability: internetReach];
[pool release]; pool = nil;
}
我不知道为什么我的应用程序启动失败及时?
这样做的另一种方法:http://stackoverflow.com/questions/1083701/how-to-check-for-an-active-internet-connection-on-iphone-sdk/3597085#3597085 – iwasrobbed 2010-10-20 19:03:31