---
title: "locationManager(_:didRangeBeacons:in:)"
framework: corelocation
role: symbol
role_heading: Instance Method
path: "corelocation/cllocationmanagerdelegate/locationmanager(_:didrangebeacons:in:)"
---

# locationManager(_:didRangeBeacons:in:)

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

## Declaration

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

## Parameters

- `manager`: The location manager object reporting the event.
- `beacons`: An array of doc://com.apple.corelocation/documentation/CoreLocation/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 doc://com.apple.corelocation/documentation/CoreLocation/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

Determining the proximity to an iBeacon device

## Discussion

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

- [locationManager(_:didRange:satisfying:)](corelocation/cllocationmanagerdelegate/locationmanager(_:didrange:satisfying:).md)
- [locationManager(_:didFailRangingFor:error:)](corelocation/cllocationmanagerdelegate/locationmanager(_:didfailrangingfor:error:).md)
- [locationManager(_:rangingBeaconsDidFailFor:withError:)](corelocation/cllocationmanagerdelegate/locationmanager(_:rangingbeaconsdidfailfor:witherror:).md)
