I'm trying to get being called the delegate method locationManager:didEnterRegion in iOS 8 for custom region. Here is the code:
self.locationManager = [[CLLocationManager alloc] init];
self.locationManager.delegate = self;
if ([self.locationManager respondsToSelector:@selector(requestWhenInUseAuthorization)]) {
[self.locationManager requestWhenInUseAuthorization];
}
CLCircularRegion *region = [[CLCircularRegion alloc] initWithCenter:CLLocationCoordinate2DMake(20, 20) radius:1000 identifier:@"asda"];
region.notifyOnEntry = YES;
region.notifyOnExit = YES;
[self.locationManager startMonitoringForRegion:region];
It does call method locationManager:didStartMonitoringForRegion
, but it doesn't call "enter" or "exit" region methods.
The one more strange thing is that it DOES work if I use requestAlwaysAuthorization for locationManager. But I need to get it worked with "When In Use".
Note: In iOS7 it works for both WhenInUse and Always Authorization methods.