I'm trying to wake up my app (relaunch it) when it enters my defined beacon region but I just can't get it to work. This are the steps and code I'm using.
- Set "Location updates" Background Mode to YES.
Monitor my CLBeaconRegion
NSUUID *uuid = [[NSUUID alloc] initWithUUIDString:@"EBEFD083-70A2-47C8-9837-E7B5634DF524"]; beaconRegion = [[CLBeaconRegion alloc] initWithProximityUUID:uuid identifier:@"daRegion"]; beaconRegion.notifyEntryStateOnDisplay = NO; beaconRegion.notifyOnEntry = YES; beaconRegion.notifyOnExit = YES; self.locationManager = [[CLLocationManager alloc] init]; self.locationManager.delegate = self; [self.locationManager startMonitoringForRegion:beaconRegion];
Implement delegate methods
- (void)locationManager:(CLLocationManager *)manager didDetermineState:(CLRegionState)state forRegion:(CLRegion *)region; - (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region; - (void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)region;
Anything that I might be missing? I have read the documentation, blog posts, forums and nothing seems to work. This is one of the websites I read, and this is the other.