Checking for Network Connectivity
suggest changeRemarks
The source code for Reachability.h and Reachability.m can be found on Apple’s developer documentation site.
Caveats
Unlike some other platforms, Apple has not provided a single standard API that reports an iOS device’s network status, and offers the sample linked above instead. Those source files change over time, but once they are copied into an app they are seldom updated.
For this reason most app developers use one of the many GitHub or CocoaPods reachability libraries.
Apple also recommends that, for a request the user initiated, you always attempt the connection first, and use Reachability or SCNetworkReachability only to diagnose a failure or to wait until the network returns.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents