Search code examples
iphonenetwork-programmingreachability

Reachability to check the current status of my Host and No Need to use Notification Center


I am using Reachability Code to check the network status of ip but currently i am using NSNotification Center. But i don't want to check like that. I need to check the network status only when i try to download something from my host.

Currently the internet connection is able to check properly but not able to check host reachability. How to do this?


Solution

  • How about something like this:

    1. Use Reachability to see if connectivity is available
    2. Try to download a file from your site if there is a network
    3. If you can't download the file, you'll get an error - deal with it gracefully.