CBMutableDescriptor
An object that provides additional information about a local peripheral’s characteristic.
Declaration
class CBMutableDescriptorOverview
You use the CBMutableDescriptor class to create a local characteristic descriptor. After you create a descriptor and associate it with a local characteristic, you can publish it to the peripheral’s local database using the add(_:) method of the CBPeripheralManager class. This also publishes the characteristic and local service to which the descriptor belongs. After you publish a local descriptor, Core Bluetooth caches the descriptor and you can no longer make changes to it.
CBUUID details predefined descriptor types and their corresponding value types. That said, only two of these are currently supported when creating local, mutable descriptors: the characteristic user description descriptor and the characteristic format descriptor. CBUUID declares these as the constants CBUUIDCharacteristicUserDescriptionString and CBUUIDCharacteristicFormatString, respectively. The system automatically creates the extended properties descriptor and the client configuration descriptor, depending on the properties of the characteristic to which the descriptor belongs.