jxx jxx - 2 years ago 190
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

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download