I have created a iphone app for beacons. In that i want to display the message when i am exit from all the beacons region.
I dont want to display the message for every beacon exit region. For example, If have 3 beacons, I want to display the message only when i am exit of all the 3 beacons. Is it possible to do that?
And also i want to get the exiting beacon major and minor values in
didExitRegion
I used the following code:
-(void)locationManager:(CLLocationManager*)manager
didRangeBeacons:(NSArray*)beacons
inRegion:(CLBeaconRegion*)region
{
// Beacon found!
NSLog(@"iBeacons found");
// UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Successfully found" message:nil delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles: nil]; [alert show];
CLBeacon *foundBeacon = [beacons firstObject];
// You can retrieve the beacon data from its properties
NSString *uuid = foundBeacon.proximityUUID.UUIDString;
NSString *majorId = [NSString stringWithFormat:@"%@", foundBeacon.major];
NSString *minorId = [NSString stringWithFormat:@"%@", foundBeacon.minor];
NSLog(@"UUID: %@", uuid);
}
In the above code i can get the uuid, major, minor of the beacons. But I want to get the values of the exiting beacon in didExitRegion
. Is it possible?
Thanks in advance.