Reachability is a network helper utility class, its used to get various informations about the connection status
What is the main purposes of Reachability?
and to register your listeners to get informed when connectivity changes
Is this the main purpose of Reachability, to show the user a message?
No of course, its main usage is either to test if there is internet connectivity, or to get notified if the connectivity changes
Yes you could use it, for example what i normally do in my project is to save all the request that has been made to a remote server, lets say i want to download 10 files,
When any file fails the download process due to no internet connection, i save them to an array of failed downloads,
When reachability informs me that the internet connection has been restored, i iterate through this array and start the download process again
What is the proper use of Reachability?
Yes that is what i do, in my projects i only have 1 instance of a download manager class, and this class has the only alive instance of Reachability
Or should I check myself the reachability status before every network
You can do that without having multiple instance of Reachability classes, what i normally do, is to have a method inside my download manager that tells me using Reachability if there is connection or not.
Is it enough to use reachabilityWithHostName or do I need also
reachabilityForLocalWiFi and reachabilityForInternetConnection?
Am not sure about this one, but what i normally do is to test connectivity on all the means, i dont differentiate between 3g or wifi, however there are some implementation that this info (wifi or 3g) could be useful
Thanks for your reply, can u please check the "one more thing" that I added to the question
Am completely unaware of that, i have 5+ apps on the appstore, they all use Reachability, i used reachability as i described above in the answer, so i dont know about what must be implemented, i normally implement what i need
You said that one of the main purpose of reachability is "to register your listeners to get informed when connectivity changes", but it does not give callback every time (try to switch routers and check).