Skip to content
Alann Maulana edited this page Dec 6, 2016 · 1 revision

Beacon region is like a filter or a regular expression. Each beacon is identified by three values:

  1. Proximity UUID, most commonly represented as a string, e.g. CB10023F-A318-3394-4199-A8730C7C1AEC.
  2. Major, an unsigned short integer, i.e., an integer ranging from 1 to 65535, (0 is a reserved value).
  3. 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:

  1. 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 number 1 and minor number 284

  2. 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 number 1 and minor number within range 0 to 65535.

  3. 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 range 0 to 65535 for each of it.

Clone this wiki locally