I'm using the air locate example and monitoring for iBeacons by uuid only. When I get the entered region event, I can't seem to get the major and minor from the beacon/region that has triggered the event if I'm only looking for the uuid (I can if I'm monitoring for a uuid with specified major and minor) - does anyone know a way to do this/am I missing something?
I don't really want to start ranging - doesn't seem like I should need to..
(The use case is for say lots of stores all with beacons with the same uuid, then issuing an OS notification with relevant information about that store (obtained by querying the major and minor))
Here's basically what I do:
CLBeaconRegion *region = [[CLBeaconRegion alloc] initWithProximityUUID:uuid
identifier:@"blah"];
region.notifyOnEntry = YES;
region.notifyOnExit = YES;
region.notifyEntryStateOnDisplay = YES;
[self.locationManager startMonitoringForRegion:region];
Then in the app delegate:
- (void) locationManager:(CLocationManager*)manager didDetermineState:(CLRegionState)state forRegion:(CLRegion*)region {
// assume for now its the iBeacon
CLBeaconRegion *beaconRegion = (CLBeaconRegion*) region;
beaconRegion.major // hasn't been set...
}
Many Thanks!