Get major and minor numbers in 'didEnterRegion'

Can we get the beacon major and minor numbers in delegate method -(void)beaconManager:(ESTBeaconManager *)manager didEnterRegion:(ESTBeaconRegion *)region?

I don’t want to mention major and minor numbers in ESTBeaconRegion* region = [[ESTBeaconRegion alloc] initWithProximityUUID:ESTIMOTE_PROXIMITY_UUID identifier:@"EstimoteSampleRegion"].

Hi @amans

If I understand you correctly, you want to set a region for a specific UUID and then in the delegate method get major/minor numbers of the beacon that triggered didEnterRegion. I’m afraid it’s not possible in this case. But when you create a region with UUID/major/minor it’s workable.

CLBeaconRegion *region = [[CLBeaconRegion alloc] initWithProximityUUID:ESTIMOTE_PROXIMITY_UUID major:1 minor:2  identifier:@"my beacon"];
[self.beaconManager startMonitoringForRegion:region];

-(void)beaconManager:(ESTBeaconManager *)manager didEnterRegion:(CLBeaconRegion *)region {
    NSLog(@"Major: %@, Minor: %@", region.major, region.minor);
}

btw. you’re using our SDK, in the new one we use CLBeaconRegion.

Best,

Hi Witek,

Thanks for your response! I tell you in detail what I am looking for:

I am creating an IOS app for one of our client, and he wants to use multiple estimote beacon devices(more than 100). We will keep the proximity UUID same for all the beacons, but we make the major and minor numbers different to distinguish the beacon device. When phone enter/exit in the range of beacon device even when the app is in foreground/background/phone locked, then our app must notify the users with information associated to particular beacon. What will be the best possible solution to achieve this?

It is difficult to set the major and minor numbers for more than 100 beacon devices with this method
CLBeaconRegion *region = [[CLBeaconRegion alloc] initWithProximityUUID:ESTIMOTE_PROXIMITY_UUID major:1 minor:2 identifier:@“my beacon”]

I am using estimote SDK version 3.2.2

Yes, the 20 region limit may be annoying in a use case like this. There is one hack that you could use. In the didEnterRegion delegate you can call [self.beaconManager startRangingBeaconsInRegion:region];. For approx. 5 seconds your app will be a able to range in the background and, for example, get major/minor values of a closest beacon.

Best,

Thanks Witek! I will try this approach.