In my iPad app, I am creating an NSURLConnection, and when a valid URL is provided, then I can read the returned data from the host. However, when I put in an invalid URL, the app crashes when I try to make the request.
What is the easiest way to determine if a URL is pointing to a host that can be accessed?
I saw that Apple has a reachability tutorial, but that does not allow you to check if a specific host can be reached.
Thanks.
NSURLConnection delegate methods: