Created
July 18, 2012 19:01
-
-
Save fousa/3138103 to your computer and use it in GitHub Desktop.
AFNetworking Reachability
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AFHTTPClient *client = [[AFHTTPClient alloc] initWithBaseURL:[NSURL URLWithString:@"http://www.apple.com"]]; | |
[client setReachabilityStatusChangeBlock:^(BOOL isNetworkReachable) { | |
NSLog(@"Reachable %i", isNetworkReachable); | |
}]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <SystemConfiguration/SystemConfiguration.h> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment