A CLBeaconRegion
defined with just a proximity UUID, or a proximity UUID and Major id may correspond to multiple physical beacons in your deployment (I will call these 'partially qualified regions' here).
didEnterRegion
notifies when the device first enters the proximity of one or more beacons that match the CLBeaconRegion
, but does not detail which matching beacons are nearby. didExitRegion
is only called when all matching beacons go out of range.
There are two uses for ranging beacons once a region has been entered:
- To get details of the nearby beacons that correspond to a partially qualified region.
This information is provided to didRangeBeacons
as an array of CLBeacon
objects. Note that the set of beacons can change over time without the device leaving the region and receiving a didExitRegion
(as long as at least one matching beacon is within range, the device is in the region). This means that applications that use partially qualified regions but still care about the specific beacons need to process the repeated invocations of didRangeBeacons
.
- To get the proximity information provided in the
CLBeacon
objects.
This may be relevant even if fully qualified regions are used. As proximity changes when the device moves within the region the repeated invocations of didRangeBeacons
need to be processed.