You’re talking about Restkit or Afnetworking?
Well, let’s have doubts.
SCNetworkReachability
serves for you to monitor your network status, it can’t tell you if a host is online or offline, but it can tell if it is "Reachable", of course, if your network (not the device), can access the host.
One of the things I see around here is people using the SCNetworkReachability
or Reachability
(which is an abstraction of SCNetworkReachability
developed by Apple), to test a network connection to then trigger a request for a remote service.
In my view, this is a total waste of time, since this way, your app takes longer to order a service and the user expects more. In addition, the network status may change in the interval between the test and the trigger of the actual request.
If in case you are using SCNetworkReachability
or Reachability
to test the network to then trigger a query, recommend you do the opposite, fire the query even if you have networking or not and do error handling after.
This post shows how to use this approach correctly.
In another case where you just want to, display the networking status on the screen for example, use the SCNetworkReachability
or Reachability
.
I hope I’ve helped.