Framework

Core Bluetooth

Communicate with Bluetooth 4.0 low energy devices.

Overview

The Core Bluetooth framework provides the classes needed for your apps to communicate with Bluetooth-equipped low energy wireless technology.

Don’t subclass any of the classes of the Core Bluetooth framework. Overriding these classes isn’t supported and results in undefined behavior.

Core Bluetooth background execution modes aren’t supported in iPad apps running on macOS.

Topics

Using Core Bluetooth Classic

Using Core Bluetooth Classic

Discover and communicate with a Bluetooth Classic device by using the Core Bluetooth APIs.

Centrals

class CBCentral

A remote device connected to a local app which is acting as a peripheral.

class CBCentralManager

An object that scans for, discovers, connects to, and manages peripherals.

protocol CBCentralManagerDelegate

A protocol that provides updates for the discovery and management of peripheral devices.

Peripherals

class CBPeripheral

A remote peripheral device.

protocol CBPeripheralDelegate

A protocol that provides updates on the use of a peripheral’s services.

class CBPeripheralManager

An object that manages and advertises peripheral services exposed by this app.

protocol CBPeripheralManagerDelegate

A protocol that provides updates for local peripheral state and interactions with remote central devices.

class CBAttribute

A representation of common aspects of services offered by a peripheral.

struct CBAttributePermissions

Values that represent the read, write, and encryption permissions for a characteristic’s value.

Services

class CBService

A collection of data and associated behaviors for accomplishing a function or feature of a device.

class CBMutableService

A service with writeable property values.

class CBCharacteristic

A characteristic of a remote peripheral’s service.

class CBMutableCharacteristic

A characteristic of a local peripheral’s service.

class CBDescriptor

An object that provides further information about a remote peripheral’s characteristic.

class CBMutableDescriptor

An object that provides additional information about a local peripheral’s characteristic.

Supporting Types

class CBManager

The abstract base class for managing central and peripheral objects.

class CBATTRequest

A request that uses the Attribute Protocol (ATT).

class CBPeer

An object that represents a remote device.

class CBUUID

A universally unique identifier, as defined by Bluetooth standards.

Errors

struct CBError

An error encountered while using Core Bluetooth.

let CBErrorDomain: String

The domain for Core Bluetooth errors.

enum CBError.Code

The possible errors returned during Bluetooth low energy transactions.

struct CBATTError

An error encountered while using Attribute Protocol (ATT).

let CBATTErrorDomain: String

The domain for Core Bluetooth ATT errors.

enum CBATTError.Code

The possible errors returned by a GATT server (a remote peripheral) during Bluetooth low energy ATT transactions.

Deprecated

enum CBCentralManagerState

Values representing the current state of a central manager object.

Deprecated
enum CBPeripheralManagerState

Values representing the current state of the peripheral manager.

Deprecated

See Also