iOS Developer Library

Developer

CoreBluetooth Framework Reference CBDescriptor Class Reference

Options
Deployment Target:

On This Page
Language:

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.

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

Table 1Predefined 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

Inheritance


Conforms To


Import Statement


Swift

import CoreBluetooth

Objective-C

@import CoreBluetooth;

Availability


Available in iOS 5.0 and later.
  • UUID UUID Available in iOS 5.0 through iOS 7.1 Property

    The Bluetooth-specific UUID of the descriptor. (read-only)

    Declaration

    Objective-C

    @property(readonly, nonatomic) CBUUID *UUID

    Discussion

    This property is a 128-bit UUID that identifies the descriptor.

    Import Statement

    Objective-C

    @import CoreBluetooth;

    Availability

    Available in iOS 5.0 through iOS 7.1.

  • The characteristic that this descriptor belongs to. (read-only)

    Declaration

    Swift

    weak var characteristic: CBCharacteristic! { get }

    Objective-C

    @property(weak, readonly, nonatomic) CBCharacteristic *characteristic

    Import Statement

    Objective-C

    @import CoreBluetooth;

    Swift

    import CoreBluetooth

    Availability

    Available in iOS 5.0 and later.