title: Using reachability on Iphone simulator and no wifi
body: <p>I am using Reachability in my IOS app to determine a connection.</p>
  
  <p>Following from this post <a href="https://stackoverflow.com/questions/6001253/wifi-on-iphone-simulator">wifi on iphone simulator</a></p>
  
  <p>If the wifi is turned off the internet connection for the simulator is not available but the phone is still connected to Wifi therefore a connection has not changed. This is all fine and understood and of course I can test on the device itself.</p>
  
  <p>However, I am looking to handle the error that a user is connected to wifi but the wifi has no internet connection like the screenshot below.</p>
  
  <p>I use reachability in the following way:</p>
  
  <pre><code>#pragma mark - ()
  - (void)monitorReachability {
  [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reachabilityChanged:) name:ReachabilityChangedNotification object:nil];
  
  self.hostReach = [Reachability reachabilityWithHostname: @"api.parse.com"];
  [self.hostReach startNotifier];
  
  self.internetReach = [Reachability reachabilityForInternetConnection];
  [self.internetReach startNotifier];
  
  self.wifiReach = [Reachability reachabilityForLocalWiFi];
  [self.wifiReach startNotifier];
  </code></pre>
  
  <p>}</p>
  
  <p>//Called by Reachability whenever status changes.
  - (void)reachabilityChanged:(NSNotification* )note {
      Reachability *curReach = (Reachability *)[note object];
      NSParameterAssert([curReach isKindOfClass: [Reachability class]]);
      NSLog(@"Reachability changed: %@", curReach);
      networkStatus = [curReach currentReachabilityStatus];</p>
  
  <p>}</p>
  
  <p>I am using Reachability for ARC from tonymillion's github here: <a href="https://github.com/tonymillion/Reachability" rel="nofollow noreferrer">https://github.com/tonymillion/Reachability</a></p>
  
  <p>Does anyone know how I can handle this situation of connection with a better error?
  <img src="https://i.stack.imgur.com/yhrp8.png" alt="enter image description here"></p>