Class

CBCharacteristic

CBCharacteristic and its subclass CBMutableCharacteristic represent further information about a peripheral’s service. CBCharacteristic objects in particular represent the characteristics of a remote peripheral’s service (remote peripheral devices are represented by CBPeripheral objects). A characteristic contains a single value and any number of descriptors describing that value. The properties of a characteristic determine how the value of the characteristic can be used and how the descriptors can be accessed.

Declaration

class CBCharacteristic : CBAttribute

Topics

Identifying a Characteristic

var service: CBService

The service that this characteristic belongs to.

Accessing Characteristic Data

var value: Data?

The value of the characteristic.

var descriptors: [CBDescriptor]?

A list of the descriptors that have been discovered in this characteristic.

var properties: CBCharacteristicProperties

The properties of the characteristic.

var isNotifying: Bool

A Boolean value indicating whether the characteristic is currently notifying a subscribed central of its value.

var isBroadcasted: Bool

You should not use this property.

Deprecated

Constants

struct CBCharacteristicProperties

Values representing the possible properties of a characteristic. Since characteristic properties can be combined, a characteristic may have multiple property values set.

Relationships

Inherits From

Conforms To

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