Skip to content

Commit

Permalink
Merge pull request AFNetworking#2704 from tewha/docs/improve-reachabi…
Browse files Browse the repository at this point in the history
…lity

Improve documentation around Reachability. (In progress)
  • Loading branch information
kcharwood committed Jul 24, 2015
2 parents cd675b6 + b415bc5 commit ff0a229
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,14 @@ NSDictionary *parameters = @{@"foo": @"bar", @"baz": @[@1, @2, @3]};

`AFNetworkReachabilityManager` monitors the reachability of domains, and addresses for both WWAN and WiFi network interfaces.

**Network reachability is a diagnostic tool that can be used to understand why a request might have failed. It should not be used to determine whether or not to make a request.**
* Do not use Reachability to determine if the original request should be sent.
* You should try to send it.
* You can use Reachability to determine when a request should be automatically retried.
* Although it may still fail, a Reachability notification that the connectivity is available is a good time to retry something.
* Network reachability is a useful tool for determining why a request might have failed.
* After a network request has failed, telling the user they're offline is better than giving them a more technical but accurate error, such as "request timed out."

See also [WWDC 2012 session 706, "Networking Best Practices."](https://developer.apple.com/videos/wwdc/2012/#706).

#### Shared Network Reachability

Expand Down

0 comments on commit ff0a229

Please sign in to comment.