CLBeacon Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/CoreLocation.framework
Availability
Available in iOS 7.0 and later.
Declared in
CLBeaconRegion.h
CLRegion.h

Overview

The CLBeacon class represents a beacon that was encountered during region monitoring. You do not create instances of this class directly. The location manager object reports encountered beacons to its associated delegate object. You can use the information in a beacon object to identify which beacon was encountered.

The identity of a beacon is defined by its proximityUUID, major, and minor properties. These values are coded into the beacon itself. For a more thorough description of the meaning of those values, see CLBeaconRegion Class Reference.

Tasks

Identifying the Beacon

Determining the Beacon Distance

Properties

accuracy

The accuracy of the proximity value, measured in meters from the beacon. (read-only)

@property (readonly, nonatomic) CLLocationAccuracy accuracy;
Discussion

Indicates the one sigma horizontal accuracy in meters. Use this property to differentiate between beacons with the same proximity value. Do not use it to identify a precise location for the beacon. Accuracy values may fluctuate due to RF interference.

A negative value in this property signifies that the actual accuracy could not be determined.

Availability
  • Available in iOS 7.0 and later.
Declared In
CLBeaconRegion.h

major

The most significant value in the beacon. (read-only)

@property (readonly, nonatomic) NSNumber *major;
Availability
  • Available in iOS 7.0 and later.
Declared In
CLBeaconRegion.h

minor

The least significant value in the beacon. (read-only)

@property (readonly, nonatomic) NSNumber *minor;
Availability
  • Available in iOS 7.0 and later.
Declared In
CLBeaconRegion.h

proximity

The relative distance to the beacon. (read-only)

@property (readonly, nonatomic) CLProximity proximity;
Discussion

The value in this property gives a general sense of the relative distance to the beacon. Use it to quickly identify beacons that are nearer to the user rather than farther away.

Availability
  • Available in iOS 7.0 and later.
Declared In
CLBeaconRegion.h

proximityUUID

The proximity ID of the beacon. (read-only)

@property (readonly, nonatomic) NSUUID *proximityUUID;
Availability
  • Available in iOS 7.0 and later.
Declared In
CLBeaconRegion.h

rssi

The received signal strength of the beacon, measured in decibels. (read-only)

@property (readonly, nonatomic) NSInteger rssi;
Discussion

This value is the average RSSI value of the samples received since the range of the beacon was last reported to your app.

Availability
  • Available in iOS 7.0 and later.
Declared In
CLBeaconRegion.h

Constants

CLProximity

Constants that reflect the relative distance to a beacon.

typedef {
   CLProximityUnknown,
   CLProximityImmediate,
   CLProximityNear,
   CLProximityFar
} CLProximity;
Constants
CLProximityUnknown

The proximity of the beacon could not be determined.

Available in iOS 7.0 and later.

Declared in CLRegion.h.

CLProximityImmediate

The beacon is in the user’s immediate vicinity.

Available in iOS 7.0 and later.

Declared in CLRegion.h.

CLProximityNear

The beacon is relatively close to the user.

Available in iOS 7.0 and later.

Declared in CLRegion.h.

CLProximityFar

The beacon is far away.

Available in iOS 7.0 and later.

Declared in CLRegion.h.