Alert when connection becomes a WIFI or cellular network
suggest change- (void)reachabilityChanged:(NSNotification *)note {
Reachability* reachability = [note object];
NetworkStatus netStatus = [reachability currentReachabilityStatus];
switch (netStatus) {
case NotReachable:
NSLog(@"Network unavailable");
break;
case ReachableViaWWAN:
NSLog(@"Network is cellular");
break;
case ReachableViaWiFi:
NSLog(@"Network is WIFI");
break;
}
}
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents