Contents

locationManager(_:didRangeBeacons:in:)

Tells the delegate that one or more beacons are in range.

Declaration

optional func locationManager(_ manager: CLLocationManager, didRangeBeacons beacons: [CLBeacon], in region: CLBeaconRegion)

Parameters

  • manager:

    The location manager object reporting the event.

  • beacons:

    An array of Clbeacon objects representing the beacons currently in range. If beacons is empty, you can assume that no beacons matching the specified region are in range. When a specific beacon is no longer in beacons, that beacon is no longer received by the device. You can use the information in the Clbeacon objects to determine the range of each beacon and its identifying information.

  • region:

    The region object containing the parameters that were used to locate the beacons.

Mentioned in

Discussion

The location manager calls this method when a new set of beacons becomes available in the specified region or when a beacon goes out of range. The location manager also calls this method when the range of a beacon changes; for example, when a beacon gets closer.

See Also

Receiving beacon-related updates