I am using Region Monitoring in my app and I faced a question that I couldn\'t find any answer to it. How does region monitoring work in background mode?
According to Lo
enable Background Modes in that enable Location updates and Background Fetch
Region monitoring Relaunches your application when you enter the monitored region if you are in background .
however you have to again configure your location manager after the app relaunches .
something like this -
if ([launchOptions objectForKey:UIApplicationLaunchOptionsLocationKey] )
{
NSLog(@"Relaunched due to location update");
NSLog(@"app woke up times ---- %d",ForTest);
NSLog(@"Starting the location manager");
self.locmanager = [[CLLocationManager alloc] init];
[self.locmanager startMonitoringForRegion:(CLRegion)*region];
// self.locmanager.pausesLocationUpdatesAutomatically = YES ;
}
As far as I know region monitoring only works with iPhone4 and it's based on the device changing the communication towers. This way it uses way less battery than the standard background location update. Make sure you enabled the appropriate background modes. As long as you implement that delegate, you should be ready to go.