-
Notifications
You must be signed in to change notification settings - Fork 2
Beacon Region
Beacon region is like a filter or a regular expression. Each beacon is identified by three values:
-
Proximity UUID, most commonly represented as a string, e.g.
CB10023F-A318-3394-4199-A8730C7C1AEC
. -
Major, an unsigned short integer, i.e., an integer ranging from
1
to65535
, (0
is a reserved value). - Minor, also an unsigned short integer, like the major number.
There are four options when it comes to ranging or monitoring beacon by a region:
-
Proximity UUID + Major + Minor, the most specific option that only scan beacon with specific proximity UUID, major and minor.
NSUUID *uuid = [[NSUUID alloc] initWithUUIDString:@"CB10023F-A318-3394-4199-A8730C7C1AEC"]; CBRegion *region = [[CBRegion alloc] initWithProximityUUID:uuid major:1 minor:284 identifier:@"regionId"];
By using this region, scanner only return beacon(s) with proximity UUID
CB10023F-A318-3394-4199-A8730C7C1AEC
, major number1
and minor number284
-
Proximity UUID + Major, option that only scan beacon with specific proximity UUID and major number.
CBRegion *region = [[CBRegion alloc] initWithProximityUUID:uuid major:1 identifier:@"regionId"];
By using this region, scanner only return beacon(s) with proximity UUID
CB10023F-A318-3394-4199-A8730C7C1AEC
, major number1
and minor number within range0
to65535
. -
Proximity UUID, option that only scan beacon with specific proximity UUID.
CBRegion *region = [[CBRegion alloc] initWithProximityUUID:uuid identifier:@"regionId"];
By using this region, scanner only return beacon(s) with proximity UUID
CB10023F-A318-3394-4199-A8730C7C1AEC
, major and minor number within range0
to65535
for each of it.