I\'m new to iOS development and am struggling to get the reachability.h class to work. Here is my code for view controller:
- (void)viewWillAppear:(BOOL)anim
The very simplest method (once you have added Reachability to your project):
Reachability *reachability = [Reachability reachabilityForInternetConnection]; if (reachability.isReachable) { NSLog(@"We have internet!"); } else { NSLog(@"No internet!"); }