Skip to content

Instantly share code, notes, and snippets.

@taketin
Created July 29, 2011 08:01
Show Gist options
  • Save taketin/1113416 to your computer and use it in GitHub Desktop.
Save taketin/1113416 to your computer and use it in GitHub Desktop.
EasyUse Reachability 2.0
//
// Project Required SystemConfiguration.framework
// Project Include Reachability.h, Reachability.m
//
// typedef enum {
// NotReachable = 0,
// ReachableViaWiFi,
// ReachableViaWWAN
// } NetworkStatus;
//
+ (NetworkStatus)getReachability {
Reachability *curReach = [[Reachability reachabilityForInternetConnection] retain];
NetworkStatus netStatus = [curReach currentReachabilityStatus];
return netStatus;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment