I am having issues with Reachability not detecting that Wifi is active connection. I have the standard Reachability class imported in my project, and on the action I perform I detect if Wifi is available to determine which action to actually perform.
Reachability *reachability = [Reachability reachabilityWithHostName:@"www.google.com"];
NetworkStatus status = [reachability currentReachabilityStatus];
NSLog(@"%i", status);
if (status == ReachableViaWiFi) {
//do wifi action
}
else {
//do non wifi action
}
No matter what, it always performs the else action. The log for the status returns '2'. Any thoughts what may be going on?
UPDATE: After much testing, I have determined that for some reason, WWAN and WIFI are reversed on this app. When running on a real device with wifi turned off, it shows connection status as WIFI and when connected to a WIFI network it shows connection status as WWAN.