<!--
{
  "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",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Core Bluetooth"
    ],
    "preciseIdentifier" : "c:objc(cs)CBUUID"
  },
  "title" : "CBUUID"
}
-->

# CBUUID

A universally unique identifier, as defined by Bluetooth standards.

```
class CBUUID
```

## Overview

Instances of the [`CBUUID`](/documentation/CoreBluetooth/CBUUID) class represent the 128-bit universally unique identifiers (UUIDs) of attributes used in Bluetooth low energy communication, such as a peripheral’s services, characteristics, and descriptors. This class provides a number of factory methods for dealing with long UUIDs when developing your app. For example, instead of passing around the string representation of a 128-bit Bluetooth low energy attribute in your code, you can create a [`CBUUID`](/documentation/CoreBluetooth/CBUUID) object that represents it, and pass that around instead.

The Bluetooth Special Interest Group (SIG) publishes a list of commonly-used UUIDs, many of which are 16- or 32-bits for convenience. The [`CBUUID`](/documentation/CoreBluetooth/CBUUID) class provides methods that automatically transform these predefined shorter UUIDs into their 128-bit equivalent UUIDs. When you create a [`CBUUID`](/documentation/CoreBluetooth/CBUUID) object from a predefined 16- or 32-bit UUID, Core Bluetooth pre-fills the rest of the 128-bit UUID with the Bluetooth base UUID, as defined in the Bluetooth 4.0 specification, Volume 3, Part F, Section 3.2.1.

In addition to providing methods for creating [`CBUUID`](/documentation/CoreBluetooth/CBUUID) objects, this class defines constants that represent the UUIDs of the Bluetooth-defined characteristic descriptors, as defined in the Bluetooth 4.0 specification, Volume 3, Part G, Section 3.3.3.

## Topics

### Creating New CBUUID Objects

[`+  UUIDWithString:`](/documentation/CoreBluetooth/CBUUID/init(string:))

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

[`+  UUIDWithData:`](/documentation/CoreBluetooth/CBUUID/init(data:))

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

[`+  UUIDWithCFUUID:`](/documentation/CoreBluetooth/CBUUID/init(cfuuid:)-3h0ry)

Creates a Core Bluetooth UUID object from a Core Foundation UUID object.

[`+  UUIDWithNSUUID:`](/documentation/CoreBluetooth/CBUUID/init(nsuuid:)-2amob)

Creates a Core Bluetooth UUID object from a Foundation UUID object.

### Inspecting CBUUID Properties

[`data`](/documentation/CoreBluetooth/CBUUID/data)

The data of the UUID.

[`UUIDString`](/documentation/CoreBluetooth/CBUUID/uuidString)

The UUID represented as a string.

### UUID Constants

[Characteristic Descriptors](/documentation/CoreBluetooth/characteristic-descriptors)

Values that represent the UUIDs of the characteristic descriptors.

## Relationships

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

---

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)