Class

CBUUID

A universally unique identifier, as defined by Bluetooth standards.

Declaration

@interface CBUUID : NSObject

Overview

Instances of the 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 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 class provides methods that automatically transform these predefined shorter UUIDs into their 128-bit equivalent UUIDs. When you create a 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 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:

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

+ UUIDWithData:

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

+ UUIDWithCFUUID:

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

Deprecated
+ UUIDWithNSUUID:

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

Inspecting CBUUID Properties

data

The data of the UUID.

UUIDString

The UUID represented as a string.

UUID Constants

Characteristic Descriptors

Values that represent the UUIDs of the characteristic descriptors.

Relationships

Inherits From

Conforms To

See Also

Supporting Types

CBManager

The abstract base class for managing central and peripheral objects.

CBATTRequest

A request that uses the Attribute Protocol (ATT).

CBPeer

An object that represents a remote device.