Roei Nadam
Roei Nadam

Reputation: 1780

Reachability in one device return "NotReachable" despite have a 4G

I have in my app check with Reachability check, but in one device in 4G its return me a NotReachable even the iPhone get Facebook messages and whatsapp.

if the iPhone in wifi this work grate.

what can be the problem ?

-(BOOL)isConnectedToInternet {
Reachability *networkReachability = [Reachability reachabilityWithHostName:HOST_NAME];
NetworkStatus networkStatus = [networkReachability currentReachabilityStatus];
return networkStatus != NotReachable;
}

Upvotes: 2

Views: 218

Answers (1)

norders
norders

Reputation: 1252

I have always had problems with Reachability. I tend not to use it now and just make the network call. AFNetworking will fail with an NSError with code kCFURLErrorNotConnectedToInternet (-1009) if there's no network.

Upvotes: 3

Related Questions