Reputation: 37
I have a class that implements the delegate NSUrlConnection
, from connection didFailWithError
. How can I detect an error caused when there is no Internet connection?
Upvotes: 0
Views: 362
Reputation: 217
According to my memory, the error code of the missing Internet connection is -1009.
In method
-(void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
try checking [error code]
Upvotes: 2