CBCentralManager objects are used to manage discovered or connected remote peripheral devices (represented by CBPeripheral objects), including scanning for, discovering, and connecting to advertising peripherals.


class CBCentralManager : CBManager


Before you call CBCentralManager methods, the state of the central manager object must be powered on, as indicated by the CBCentralManagerState.poweredOn constant. This state indicates that the central device (your iPhone or iPad, for instance) supports Bluetooth low energy and that Bluetooth is on and available to use.


Initializing a Central Manager

init(delegate: CBCentralManagerDelegate?, queue: DispatchQueue?)

Initializes the central manager with a specified delegate and dispatch queue.

init(delegate: CBCentralManagerDelegate?, queue: DispatchQueue?, options: [String : Any]?)

Initializes the central manager with specified delegate, dispatch queue, and initialization options.

Establishing or Canceling Connections with Peripherals

func connect(CBPeripheral, options: [String : Any]?)

Establishes a local connection to a peripheral.

func cancelPeripheralConnection(CBPeripheral)

Cancels an active or pending local connection to a peripheral.

Retrieving Lists of Peripherals

func retrieveConnectedPeripherals(withServices: [CBUUID]) -> [CBPeripheral]

Returns a list of the peripherals (containing any of the specified services) currently connected to the system.

func retrievePeripherals(withIdentifiers: [UUID]) -> [CBPeripheral]

Returns a list of known peripherals by their identifiers.

Scanning or Stopping Scans of Peripherals

func scanForPeripherals(withServices: [CBUUID]?, options: [String : Any]?)

Scans for peripherals that are advertising services.

func stopScan()

Asks the central manager to stop scanning for peripherals.

Monitoring Properties

var delegate: CBCentralManagerDelegate?

The delegate object you want to receive central events.


enum CBCentralManagerState

Values representing the current state of a central manager object.



Instance Properties


Inherits From

Conforms To

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software