title: How to use reachability class to detect valid internet connection?
body: <p>I'm new to iOS development and am struggling to get the reachability.h class to work. Here is my code for view controller:</p>
  
  <pre><code>- (void)viewWillAppear:(BOOL)animated
  {
      [[NSNotificationCenter defaultCenter]
       addObserver:self 
       selector:@selector(checkNetworkStatus:) 
       name:kReachabilityChangedNotification 
       object:nil];
  
      internetReachable = [Reachability reachabilityForInternetConnection];
      [internetReachable startNotifier];
  }
  
  - (void)checkNetworkStatus:(NSNotification *)notice {
      NetworkStatus internetStatus = [internetReachable currentReachabilityStatus];
      NSLog(@"Network status: %i", internetStatus);
  }
  </code></pre>
  
  <p>It looks ok but nothing is appearing in the xcode console when running the app and switching to that view.</p>
  
  <p>I'm using Reachability 2.2 and iOS 4.2.</p>
  
  <p>Is there something obvious that I am doing wrong?</p>