Tewha.net Mostly about iOS.

Reachability

Apple has a sample code package called Reachability. It wraps an iOS framework called SystemConfiguration, and can be used to determine network status, and catch events about networking going up and down. In the past, it’s been an ugly chunk of sample code, but it’s pretty respectable now.

One thing Reachability is not, however, is a crystal ball. Please don’t use it as if it were.

In this article, I’m going to discuss how to use it. Because this is one thing I see a lot of developers get wrong.

How should you use Reachability?

Reachability is a great tool, but it’s a tool for particular tasks. Learn the tasks Reachability is suited to, and your app will be better for it. You wouldn’t use a hammer to change a light bulb. Please don’t use Reachability to determine if a connection will fail.