Platforms to show: All Mac Windows Linux Cross-Platform

Back to CBMutableCharacteristicMBS class.

CBMutableCharacteristicMBS.Constructor(UUID as CBUUIDMBS, properties as Integer, value as MemoryBlock, permissions as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Bluetooth MBS Bluetooth Plugin 18.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a newly initialized mutable characteristic with specified permissions, properties, and value.

UUID: A 128-bit UUID that identifies the characteristic.
properties: The properties of the characteristic.
value: The characteristic value to be cached. If nil, the value is dynamic and will be requested on demand.
permissions: The permissions of the characteristic value.

Returns a newly initialized mutable characteristic.

If you specify a value for the characteristic, the value is cached and its properties and permissions are set to CBCharacteristicPropertyRead and CBAttributePermissionsReadable, respectively. Therefore, if you need the value of a characteristic to be writeable, or if you expect the value to change during the lifetime of the published service to which the characteristic belongs, you must specify the value to be nil. So doing ensures that the value is treated dynamically and requested by the peripheral manager whenever the peripheral manager receives a read or write request from a central. When the peripheral manager receives a read or write request from a central, it calls the didReceiveReadRequest or the didReceiveWriteRequests event, respectively.

CBMutableCharacteristicMBS.setDescriptors(Descriptors() as CBDescriptorMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Bluetooth MBS Bluetooth Plugin 18.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Set the list of descriptors that describe the characteristic.

The value of this property is an array of CBDescriptor objects that represent a characteristic’s descriptors. Characteristic descriptors provide more 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. For more information about characteristic descriptors, see CBDescriptor.

CBMutableCharacteristicMBS.subscribedCentrals as CBDescriptorMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Bluetooth MBS Bluetooth Plugin 18.1 ✅ Yes ❌ No ❌ No ✅ Yes All
A list of centrals currently subscribed to the characteristic’s value.

The value of this property is an array of CBCentral objects that are currently subscribed to the characteristic’s value. The array is empty if the characteristic is not configured to support notifications or indications. Even if the characteristic is configured to support notifications or indications, the array is empty if no centrals are currently subscribing to the characteristic’s value.

The items on this page are in the following plugins: MBS Bluetooth Plugin.


The biggest plugin in space...