Beginner Estimote question: What is the correct approach for adding multiple Estimote beacons, with their respective major/minors, so that all beacons can be detected separately using startRangingBeaconsInRegion?
This code works fine for a single beacon:
// Single Beacon Region
ESTBeaconRegion* beaconRegion = [[ESTBeaconRegion alloc] initWithProximityUUID:ESTIMOTE_PROXIMITY_UUID
major:11111 minor:11111
identifier: @"EstimoteSampleRegion"];
// Start ranging beacons
[self.beaconManager startRangingBeaconsInRegion:beaconRegion];
However this code does not work for multiple beacons:
// Beacon 1 Region
ESTBeaconRegion* beacon1Region = [[ESTBeaconRegion alloc] initWithProximityUUID:ESTIMOTE_PROXIMITY_UUID
major:11111 minor:11111
identifier: @"EstimoteSampleRegion"];
// Beacon 2 Region
ESTBeaconRegion* beacon2Region = [[ESTBeaconRegion alloc] initWithProximityUUID:ESTIMOTE_PROXIMITY_UUID
major:22222 minor:22222
identifier: @"EstimoteSampleRegion"];
// Beacon 3 Region
ESTBeaconRegion* beacon3Region = [[ESTBeaconRegion alloc] initWithProximityUUID:ESTIMOTE_PROXIMITY_UUID
major:33333 minor:33333
identifier: @"EstimoteSampleRegion"];
// Start ranging beacons
[self.beaconManager startRangingBeaconsInRegion:beacon1Region];
[self.beaconManager startRangingBeaconsInRegion:beacon2Region];
[self.beaconManager startRangingBeaconsInRegion:beacon3Region];
With this code only the last beacon is detected. (So in this case, only beacon3Region is detected).
—
If you know how to add and detect multiple beacons with ESTBeaconRegion and startRangingBeaconsInRegion I would appreciate a code example that explains how to do this.