iOS4 Issue: NSURLConnection and NSOperation

Posted by Daniel Vela on December 19, 2010

http://blog.mugunthkumar.com/coding/ios4-issue-nsurlconnection-and-nsoperation/

There is some bug in iOS4 when calling NSURLConnection from a thead different from the main one. To solve this issue use the following code:

//iOS 4 bug fix  
if (![NSThread isMainThread]) {  
	[self performSelectorOnMainThread:@selector(start)  
	withObject:nil waitUntilDone:NO];  
	return;  
}