Reachability is a lightweight Objective-C wrapper around Apple’s SCNetworkReachability that reports whether the network is reachable and via which interface (Wi-Fi or cellular). It exposes both notifications and blocks so you can react to connectivity changes without polling. Typical usage is to gate network requests, disable online-only UI, and show graceful messaging when connectivity drops. The implementation is careful about threading and runloop scheduling so events arrive reliably without blocking the main thread. It also supports reachability checks for specific hosts, enabling smarter behavior than a simple “internet yes/no” toggle. Despite newer frameworks existing today, Reachability remains widely referenced for its simple API and predictable behavior in legacy Objective-C codebases.
Features
- ARC-compatible and leverages Grand Central Dispatch for reachability updates
- Supports notification-based callbacks via NSNotificationCenter
- Offers block-based callbacks for more concise reachability handling
- Allows treating WWAN (cellular) connectivity as reachable or not via configuration
- Simple integration by adding .h/.m files and linking against SystemConfiguration.framework
- Compatible with Swift (e.g., Swift 3) and Objective-C projects