The reliability of Reachability

Mike Ash’s blog post about Apple’s networking API, called Reachability, has spawned a very interesting and eye-opening discussion in its comments. The post can be found here Friday Q&A 2013-06-14: Reachability

The two main points I took away from this are:

  1. Make an initial network request attempt before asking Reachability if the network is available, in case, for example, the device’s radio transmitter is off due to the device being in a low-power state and needs to be turned on to make a network request.
  2. If you rely on Reachability to inform your code when the network becomes available again, also provide the user with a means of manually attempting to connect to the server (in case Reachability cannot detect when a problem is fixed, such as the server being temporarily offline).

I typically rely on the Reachability wrapper API included in the AFNetworking library to manage an app’s connections to the outside world. Perhaps I have been relying on it a bit too much…

About Josh Smith

Josh Smith is a musician at heart, and a software developer by obsession. He lives in Arizona, plays classical music on the piano, jazz on the guitar, and enjoys brutally long rides on his bicycle. He has a wonderful wife & son and thinks that, in general, life is good.
This entry was posted in Networking. Bookmark the permalink.