Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reachability issue on iPhone: networkStatusForFlags

I'm doing a few server calls and getting back some json. The code is pretty simple, it does a call to sign you in, and then does another call to get more info. I keep getting Reachability errors when I try to make the second call.

Reachability Flag Status: -R ------- networkStatusForFlags

Not sure why it does that. I'm running this in the simulator and I'm on Wifi and the first call goes through just fine.

like image 878
Cory Schulz Avatar asked Feb 16 '12 11:02

Cory Schulz


1 Answers

If you're using the Reachability sample code from Apple, that is not an error but a debug message. In particular, the R flag means that the network is reachable (yay!).

The sample code prints reachability flags by default. You can turn off this behavior by setting kShouldPrintReachabilityFlags to 0 in Reachability.m:

#define kShouldPrintReachabilityFlags 0
like image 66
hpique Avatar answered Nov 26 '22 01:11

hpique