title: CLLocationManager's didExitRegion is never called
body: <p>I'm trying to setup a small geofence (of 100 meters) to alert a user whenever they leave their home. To do this I request the users current location like so:</p>
  
  <pre><code>- (void)requestUsersCurrentLocation
  {
      if (self.locationManager == nil) self.locationManager = [[CLLocationManager alloc] init];
  
      self.locationManager.delegate = self;
      self.locationManager.desiredAccuracy = kCLLocationAccuracyBest;
      self.locationManager.distanceFilter = 100;
      [self.locationManager startUpdatingLocation];
  }
  </code></pre>
  
  <p>Using CLLocationManager's delegate methods I check whether the application was able to determine the users current location. In my testing, this works correctly and the application proceeds to call my <code>attemptToRegisterGeofenceAlertForLocation:</code> method</p>
  
  <pre><code>- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations
  {
      CLLocation *location = [locations lastObject];
      NSDate *eventDate = location.timestamp;
      NSTimeInterval howRecent = [eventDate timeIntervalSinceNow];
      if (abs(howRecent) &lt; 15.0)
      {
          [self.locationManager stopUpdatingLocation];
  
          if([self attemptToRegisterGeofenceAlertForLocation:location])
          {
              [[NSNotificationCenter defaultCenter] postNotificationName:kGeofenceSetupSuccess object:nil];
          }
          else
          {
              [[NSNotificationCenter defaultCenter] postNotificationName:kGeofenceSetupFailure object:nil];
          }
      }
  }
  </code></pre>
  
  <p>So far so good. Here's my custom function to register a relatively small geofence around the users current location:</p>
  
  <pre><code>- (BOOL)attemptToRegisterGeofenceAlertForLocation:(CLLocation *)location
  {
      // Do not create regions if support is unavailable or disabled
      if (![CLLocationManager regionMonitoringAvailable]) return NO;
  
      // Check the authorization status
      if (([CLLocationManager authorizationStatus] != kCLAuthorizationStatusAuthorized) &amp;&amp; ([CLLocationManager authorizationStatus] != kCLAuthorizationStatusNotDetermined)) return NO;
  
      // Clear out any old regions to prevent buildup.
      if ([self.locationManager.monitoredRegions count] &gt; 0)
      {
          for (id obj in self.locationManager.monitoredRegions)
          {
              [self.locationManager stopMonitoringForRegion:obj];
          }
      }
  
      // If the overlay's radius is too large, registration fails automatically,
      // so clamp the radius to the max value.
      CLLocationDegrees radius = 100; // meters?
      if (radius &gt; self.locationManager.maximumRegionMonitoringDistance)
      {
          radius = self.locationManager.maximumRegionMonitoringDistance;
      }
  
      // Create the region to be monitored.
      CLRegion *region = [[CLRegion alloc] initCircularRegionWithCenter:location.coordinate radius:radius identifier:kGeofenceIdentifier];
      [self.locationManager startMonitoringForRegion:region];
  
      return YES;
  }
  </code></pre>
  
  <p>When the user exits the geofence region, I respond to it like so:</p>
  
  <pre><code>- (void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)region
  {
      if([region.identifier isEqual:kGeofenceIdentifier])
      {
          if([[UIApplication sharedApplication] applicationState] == UIApplicationStateBackground)
          {
              // Fire a UILocationNotification
          }
          else
          {
              // Fire a UIAlertView
          }
      }
  }
  </code></pre>
  
  <p>I've determined that the application is able to fetch the users location and that a geofence is correctly registered, however I'm unable to trigger it on an actual device (a 3G-enabled iPhone). I've left the geofenced region and travelled several miles without receiving any kind of notification. I've successfully managed to receive the alert in the Simulator by drastically changing my location.</p>
  
  <p>What am I doing wrong?</p>