I am using the following code to monitor for regions in my iOS app. It works perfectly when I build the app on iOS6. When I build it on iOS7, the didEnterRegion is not triggered.
// create and register a region with iOS
CLLocationCoordinate2D venueCenter = CLLocationCoordinate2DMake([favoriteVenue.venueLat doubleValue], [favoriteVenue.venueLng doubleValue]);
CLRegion *region = [[CLRegion alloc] initCircularRegionWithCenter:venueCenter radius:REGION_RADIUS identifier:favoriteVenue.venueId];
AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
[appDelegate.locationManager startMonitoringForRegion:[self regionForVenue:favoriteVenue]];
// In the AppDelegate.m
- (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region
{
NSLog(@"Entered region: %@", region.identifier);
}
I have also set the Required background modes as "App registers for location updates" in my plist files.
Any ideas of what is missing for this feature to work on iOS7?
Thanks!