<!--
{
  "availability" : [
    "iOS: 6.0.0 -",
    "iPadOS: 6.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreBluetooth",
  "identifier" : "/documentation/CoreBluetooth/CBMutableDescriptor/init(type:value:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Core Bluetooth"
    ],
    "preciseIdentifier" : "c:objc(cs)CBMutableDescriptor(im)initWithType:value:"
  },
  "title" : "init(type:value:)"
}
-->

# init(type:value:)

Creates a mutable descriptor with a specified value.

```
init(type UUID: CBUUID, value: Any?)
```

## Parameters

`UUID`

A 128-bit UUID that identifies the characteristic. You must use only one of the two currently supported descriptor types: [`CBUUIDCharacteristicUserDescriptionString`](/documentation/CoreBluetooth/CBUUIDCharacteristicUserDescriptionString) or [`CBUUIDCharacteristicFormatString`](/documentation/CoreBluetooth/CBUUIDCharacteristicFormatString). For more details about these descriptor types, see [`CBUUID`](/documentation/CoreBluetooth/CBUUID).

`value`

The descriptor value to cache. You must provide a non-`nil` value. Once published, you can’t update the value dynamically.

## Return Value

A newly initialized mutable descriptor.

## Discussion

The value type of `value` depends on the type of descriptor:

- The value type of [`CBUUIDCharacteristicUserDescriptionString`](/documentation/CoreBluetooth/CBUUIDCharacteristicUserDescriptionString) is a string you use to provide a human-readable description of the characteristic’s value.
- The value type of a [`CBUUIDCharacteristicFormatString`](/documentation/CoreBluetooth/CBUUIDCharacteristicFormatString) is an <doc://com.apple.documentation/documentation/Foundation/NSData> object that you use to specify how to format the characteristic’s value for presentation purposes.

If you want to create a local characteristic format descriptor, the descriptor’s value must conform to the attribute value of the characteristic format descriptor as defined in the Bluetooth 4.0 specification, Volume 3, Part G, Section 3.3.3.5.

For more information, see [Core Bluetooth Programming Guide](https://developer.apple.com/library/archive/documentation/NetworkingInternetWeb/Conceptual/CoreBluetooth_concepts/AboutCoreBluetooth/Introduction.html#//apple_ref/doc/uid/TP40013257).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)