I am using NSURLConnection in an iPhone app as so:
NSURLConnection *conn = [[NSURLConnection alloc] initWithRequest: request delegate: self];
The request has been setup and works properly, but I want to be able to provide a "connection not available" message to the user if there isn't a connection available. Is there a quick way to determine whether an Internet connection is available on the iPhone?
Would something as simple as adding the following after initing the NSURLConnection:
if (conn) { // do normal processing } else { // display connection not available message }
Thanks in advance, Ben