Instance Method

startRangingBeacons(in:)

Starts the delivery of notifications for the specified beacon region.

Declaration

func startRangingBeacons(in region: CLBeaconRegion)

Parameters

region

The region object that defines the identifying information for the targeted beacons. The number of beacons represented by this region object depends on which identifier values you use to initialize it. Beacons must match all of the identifiers you specify. This method copies the region information it needs from the object you provide.

Discussion

Once registered, the location manager reports any encountered beacons to its delegate by calling the locationManager(_:didRangeBeacons:in:) method. If there is an error registering the specified beacon region, the location manager calls its delegate’s locationManager(_:rangingBeaconsDidFailFor:withError:) method and provides the appropriate error information.

See Also

Initiating Beacon Ranging Requests

func stopRangingBeacons(in: CLBeaconRegion)

Stops the delivery of notifications for the specified beacon region.

func requestState(for: CLRegion)

Retrieves the state of a region asynchronously.

var rangedRegions: Set<CLRegion>

The set of regions currently being tracked using ranging.