Class

CBDescriptor

CBDescriptor and it subclass CBMutableDescriptor represent a descriptor of a peripheral’s characteristic. CBDescriptor objects in particular represent the descriptors of a remote peripheral’s characteristic (remote peripheral devices are represented by CBPeripheral objects). Descriptors provide further information about a characteristic’s value. For example, they may describe the value in human-readable form and describe how the value should be formatted for presentation purposes. Characteristic descriptors also indicate whether a characteristic’s value is configured on a server (a peripheral) to indicate or notify a client (a central) when the value of the characteristic changes.

Declaration

class CBDescriptor : CBAttribute

Overview

There are six predefined types of descriptors that—along with their corresponding value types—are detailed in CBUUID. CBDescriptor lists the predefined types of descriptors and the CBUUID constants that are used to represent them.

Table 1

Predefined descriptors

Descriptor type

Descriptor constant

Characteristic extended properties

CBUUIDCharacteristicExtendedPropertiesString

Characteristic user description

CBUUIDCharacteristicUserDescriptionString

Client characteristic configuration

CBUUIDClientCharacteristicConfigurationString

Server characteristic configuration

CBUUIDServerCharacteristicConfigurationString

Characteristic format

CBUUIDCharacteristicFormatString

Characteristic aggregate format

CBUUIDCharacteristicAggregateFormatString

Topics

Identifying a Descriptor

var characteristic: CBCharacteristic

The characteristic that this descriptor belongs to.

Accessing Descriptor Data

var value: Any?

The value of the descriptor.

Relationships

Inherits From

Conforms To