A region used to detect iBeacon hardware.
- iOS 7.0+
- Core Location
CLBeacon object defines a region that you use to detect Bluetooth beacons. Whereas a
CLCircular is centered on a geographic location, a
CLBeacon is centered on an iBeacon with specific identifying information, which you provide. When a matching device comes in range, Core Location notifies your app.
You monitor beacon regions in two ways. To detect when a beacon is in range, use the
start method of your location manager object. After detecting a beacon, call the
start method to determine the relative distance to that beacon.
When detecting an iBeacon, you must specify the
minor values that you programmed into the beacon hardware. You use the values to identify your beacons uniquely and you can specify a subset of values to detect multiple beacons. The
proximity property is typically the same for all of the beacons in your installation. Use the
minor values to distinguish among different beacons in your installation.
If you want to configure the current iOS device as a Bluetooth beacon, create a beacon region with the appropriate identifying information. You can then call the
peripheral method of the region to get a dictionary that you can use to advertise the device with the Core Bluetooth framework. For more information about using that framework to advertise the device as a beacon, see Turning an iOS Device into an iBeacon.
For information about how to detect beacons, see Determining the Proximity to an iBeacon.