Setting the major and minor value of iBeacon

807 Views Asked by At

I want to set the major and minor value correctly as I enter in a region.For example,I have different queues for different kinds of customer. Like Premium and silver categories.

If a customer goes in the lane of Premium, He should broadcast his major value as the value of the lane he is standing i.e. Premium and the number as minor.

How to set these values correctly according to the current position of the customer?

Premium = 1;
Silver = 2;
self.myBeaconRegion = [[CLBeaconRegion alloc] initWithProximityUUID:uuid major:premium minor:2 identifier:@"com.example.beacon"];
1

There are 1 best solutions below

2
On

The major and minor values are set on the beacon - these are the values that are received by your app to indicate the region where the device is located.

So, in your case you would have to have two beacons, one configured the with 'premium' value and one with the 'silver' values but with the same UUID. In your app you can define the region just by UUID and examine the major/minor in didEnterRegion To determine which specific beacon was detected.

However, Unless the queues are a fair distance apart you may have difficulty locating the user accurately