In iOS 4.0 and above, when the user closes the app, it is put into a suspended state. Unless you tell it to do otherwise, the delegate callbacks won't fire until the user opens the app again. You can test yourself by writing some NSLogs in your callbacks. Then, run the app on a test device, and try closing the app just after you see the connection start. Wait a while and reopen the app (still 'running' in Xcode), and watch as the delegate callbacks get called.
//somewhere just after you start the async connection
NSLog(@"Connection started...");
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error {
NSLog(@"Connection failed with error - %@",error);
}
- (void)connectionDidFinishLoading:(NSURLConnection *)connection {
NSLog(@"D- Connection finished loading");
}
If you'd like the connection(s) to continue to run after the app is closed by the user, then have a read through 'Executing Code in the Background' in the iOs Application Programming Guide.