Skip to content

Commit

Permalink
Add an explanation of Reachability.
Browse files Browse the repository at this point in the history
  • Loading branch information
tewha committed May 26, 2014
1 parent 2ee9d05 commit f9d86b9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions AFNetworking/AFNetworkReachabilityManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,13 @@ typedef NS_ENUM(NSInteger, AFNetworkReachabilityStatus) {

/**
`AFNetworkReachabilityManager` monitors the reachability of domains, and addresses for both WWAN and WiFi network interfaces.
Reachability can be used to determine background information about why a network operation failed, or to trigger a network operation retrying when a connection is established. It should not be used to block a user from initiating a network request. It's possible that the user request may successfully initiate networking.
You can see this behavior modeled in Safari on iOS. You can start a web request at any time. If iOS sees a network connection start, it will automatically retry a failed request. However, the network status does not prevent the user from trying a request.
See Apple's Reachability Sample Code (https://developer.apple.com/library/ios/samplecode/reachability/)
@warning Instances of `AFNetworkReachabilityManager` must be started with `-startMonitoring` before reachability status can be determined.
*/
@interface AFNetworkReachabilityManager : NSObject
Expand Down

0 comments on commit f9d86b9

Please sign in to comment.