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


1 answer


Cm

@property (readonly, nonatomic, assign) AFNetworkReachabilityStatus networkReachabilityStatus

      



On AFHTTPClient

.

+3


source







All Articles