Instance Method

peripheralData(withMeasuredPower:)

Retrieves data that can be used to advertise the current device as a beacon.

Declaration

func peripheralData(withMeasuredPower measuredPower: NSNumber?) -> NSMutableDictionary

Parameters

measuredPower

The received signal strength indicator (RSSI) value (measured in decibels) for the device. This value represents the measured strength of the beacon from one meter away and is used during ranging. Specify nil to use the default value for the device.

Return Value

A dictionary of data that you can use in conjunction with a CBPeripheralManager to advertise the current device as a beacon.

Discussion

The returned dictionary encodes the beacon’s identifying information along with other information needed to advertise the beacon. You should not need to access the dictionary contents directly. Pass the dictionary to the startAdvertising(_:) method of a CBPeripheralManager to begin advertising the beacon.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software