Get current availability state with RestKit 0.20
So I am using RestKit 0.20.0 and getting achievement changes via this block:
[objectManager.HTTPClient setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) {
if (status == AFNetworkReachabilityStatusNotReachable) {
self.isConnectedToInternet = NO;
}
else {
self.isConnectedToInternet = YES;
}
}];
I store the state with a property called isConnectedToInternet, but this only happens when reachability changes. I don't see a method or property in RKObjectManager or the version of AFNetworking that RestKit uses to just get the current reachability state, e.g .:
[AFNetworkReachabilityManager sharedManager].reachable
Any ideas?
+3
source to share