jxx jxx - 4 months ago 22x
iOS Question

What does NSURLConnection's error code "-1009" mean?

When I send a request and get an error with the error code

, what does that mean? I'm not sure how to handle it.

- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error{
NSLog(@"connection didFailWithError");

//do something


Since the error returned should be within the NSURLErrorDomain, the code -1009 means:


Returned when a network resource was requested, but an internet connection is not established and cannot be established automatically, either through a lack of connectivity, or by the user's choice not to make a network connection automatically.