title: Geofencing didEnterRegion,didExitRegion function not Calling in iphone 5S iOS8.1
body: <p>I had debugged all day and delegate did get called at all.</p>
  
  <pre><code>- (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region
  </code></pre>
  
  <p>Well here is my standard code calling for a monitor. use CoreLocation.framework.</p>
  
  <pre><code>[locationManager startMonitoringForRegion:geofence];
  </code></pre>
  
  <p>And registered these in my plist.</p>
  
  <pre><code>&lt;key&gt;NSLocationAlwaysUsageDescription&lt;/key&gt;
  &lt;string&gt;Lugang&lt;/string&gt;
  &lt;key&gt;NSLocationWhenInUseUsageDescription&lt;/key&gt;
  &lt;string&gt;Lugang&lt;/string&gt;
  </code></pre>
  
  <p>background app refresh in enable, but I didn't see my app within.</p>
  
  <p>I had tried to print my monitoredRegions in instance of LocationManager and there is my monitored region.</p>
  
  <pre><code>NSLog(@"%@" ,locationManager.monitoredRegions);
  </code></pre>
  
  <p>and regionMonitoringAvailable is true.</p>
  
  <pre><code>NSLog(@"%d" , [CLLocationManager regionMonitoringAvailable] );
  </code></pre>
  
  <p>In iOS 8, I had asked for requestAlwaysAuthorization</p>
  
  <pre><code>[locationManager requestAlwaysAuthorization];
  </code></pre>
  
  <p>I had tried three states , app in foreground, app in background, app is not active. none of these states called.</p>
  
  <pre><code>-(void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error
  </code></pre>
  
  <p>didn't get any errors at all.</p>
  
  <p>And I had tried </p>
  
  <pre><code>[locationManager requestStateForRegion:geofence];
  </code></pre>
  
  <p>works fine.</p>
  
  <pre><code>- (void)locationManager:(CLLocationManager *)manager didDetermineState:(CLRegionState)state forRegion:(CLRegion *)region
  </code></pre>
  
  <p>did trigger in my requestStateForRegion.</p>
  
  <p>I don't know what it is to make didEnterRegion didn't get called and I know in iOS 7 and above devices work but I don't have such a device to testify now.</p>
  
  <p>Maybe requestStateForRegion could fulfill my requestment, But I still couldn't figure out how does DidEnterRegion not work. And none of these trigger any error messages to tell developers to debug.</p>