I want Location based Reminder when user reaches to certain region
For that I have writen followin code
CLLocationManager *manager=[[CLLocationManager alloc] init];
manager.desiredAccuracy=kCLLocationAccuracyBest;
manager.delegate=self;
CLLocationCoordinate2D loc;
loc.latitude=LReminder.lat;
loc.longitude=LReminder.lon;
CLRegion *region=[[CLRegion alloc] initCircularRegionWithCenter:loc
radius:LReminder.accuracy dentifier:LReminder.title];
CLLocationAccuracy acc=1.0;
[manager startMonitoringForRegion:region desiredAccuracy:acc];
[manager startMonitoringSignificantLocationChanges];
And for the manager delegate
-(void)locationManagerCLLocationManager *)manager didEnterRegionCLRegion *)region
{
NSLog(@"didEnterRegion for %@",region.identifier);
UIAlertView *alr=[[UIAlertView alloc] initWithTitle:@"Reminder didEnterRegion"
message:region.identifier delegate:nil cancelButtonTitle:nil otherButtonTitles:@"Ok",nil];
[alr show];
[alr release];
}
-(void)locationManagerCLLocationManager *)manager didExitRegionCLRegion *)region
{
NSLog(@"didExitRegion for %@",region.identifier);
UIAlertView *alr=[[UIAlertView alloc] initWithTitle:@"Reminder didExitRegion" message:region.identifier delegate:nil cancelButtonTitle:nil otherButtonTitles:@"Ok",nil];
[alr show];
[alr release];
}
Problem is when I reach to reminder location it is not calling any of the delegates' methods
please help me