AdvertisementData
public struct AdvertisementData
Convenience class which helps reading advertisement data
-
Advertisement data dictionary that contains all information advertised by peripheral.
Declaration
Swift
public let advertisementData: [String : Any]
-
Creates advertisement data based on CoreBluetooth’s dictionary
Declaration
Swift
public init(advertisementData: [String : Any])
Parameters
advertisementData
Core Bluetooth’s advertisement data
-
A string containing the local name of a peripheral.
Declaration
Swift
public var localName: String? { get }
-
A Data object containing the manufacturer data of a peripheral.
Declaration
Swift
public var manufacturerData: Data? { get }
-
A dictionary containing service-specific advertisement data. The keys are CBUUID objects, representing CBService UUIDs. The values are Data objects, representing service-specific data.
Declaration
Swift
public var serviceData: [CBUUID : Data]? { get }
-
An array of service UUIDs.
Declaration
Swift
public var serviceUUIDs: [CBUUID]? { get }
-
An array of one or more CBUUID objects, representing CBService UUIDs that were found in the “overflow” area of the advertisement data.
Declaration
Swift
public var overflowServiceUUIDs: [CBUUID]? { get }
-
A number (an instance of NSNumber) containing the transmit power of a peripheral. This key and value are available if the broadcaster (peripheral) provides its Tx power level in its advertising packet. Using the RSSI value and the Tx power level, it is possible to calculate path loss.
Declaration
Swift
public var txPowerLevel: NSNumber? { get }
-
A Boolean value that indicates whether the advertising event type is connectable. The value for this key is an NSNumber object. You can use this value to determine whether a peripheral is connectable at a particular moment.
Declaration
Swift
public var isConnectable: Bool? { get }
-
An array of one or more CBUUID objects, representing CBService UUIDs.
Declaration
Swift
public var solicitedServiceUUIDs: [CBUUID]? { get }