Reachability Updates

I mentioned in passing yesterday that Apple recently updated the Reachability class that provides a way to monitor the network connectivity of an iOS device. What I did not get a chance to mention is an alternative implementation created by Andrew Donoho which you may want to take a look at. You can find some more details on his site, I can’t claim to have used it yet, but it looks like a simpler and cleaner implementation to use.

The recent updates to the reachability class (now at version 2.2) by Apple have removed some of the rough edges that Andrew highlights. In particular the spelling mistakes in the method names -startNotifier and -stopNotifier (previously -startNotifer / -stopNotifer) and a redundant call to [super init]. If you are updating an app that uses an earlier version of the reachability class this will of course require you to fix your code anywhere you have used the misspelt methods.

I should mention that I came across this alternative implementation via the excellent ASIHTTPRequest library created by Ben Copsey which has adopted it in its latest release. If you need to do anything which involves interacting with a web server it is well worth checking out ASIHTTPRequest.