<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.7.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreBluetooth",
  "identifier" : "/documentation/CoreBluetooth/CBUUID/init(data:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Core Bluetooth"
    ],
    "preciseIdentifier" : "c:objc(cs)CBUUID(cm)UUIDWithData:"
  },
  "title" : "init(data:)"
}
-->

# init(data:)

Creates a Core Bluetooth UUID object from a 16-, 32-, or 128-bit UUID data container.

```
init(data theData: Data)
```

## Parameters

`theData`

Data containing a 16-, 32-, or 128-bit UUID.

## Return Value

A new [`CBUUID`](/documentation/CoreBluetooth/CBUUID) object for the specified UUID data.

## Discussion

This method is useful when handling the UUID of a Bluetooth attribute in raw bytes.

---

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)