Protocol

CBCentralManagerDelegate

The CBCentralManagerDelegate protocol defines the methods that a delegate of a CBCentralManager object must adopt. The optional methods of the protocol allow the delegate to monitor the discovery, connectivity, and retrieval of peripheral devices. The only required method of the protocol indicates the availability of the central manager, and is called when the central manager’s state is updated.

Declaration

@protocol CBCentralManagerDelegate

Topics

Monitoring Connections with Peripherals

- centralManager:didConnectPeripheral:

Invoked when a connection is successfully created with a peripheral.

- centralManager:didDisconnectPeripheral:error:

Invoked when an existing connection with a peripheral is torn down.

- centralManager:didFailToConnectPeripheral:error:

Invoked when the central manager fails to create a connection with a peripheral.

Discovering and Retrieving Peripherals

- centralManager:didDiscoverPeripheral:advertisementData:RSSI:

Invoked when the central manager discovers a peripheral while scanning.

Monitoring Changes to the Central Manager’s State

- centralManagerDidUpdateState:

Invoked when the central manager’s state is updated.

Required.

- centralManager:willRestoreState:

Invoked when the central manager is about to be restored by the system.

Constants

Advertisement Data Retrieval Keys

Keys to specify in an advertisementData dictionary.

Relationships

Inherits From