Protocol

CBCentral​Manager​Delegate

The CBCentral​Manager​Delegate protocol defines the methods that a delegate of a CBCentral​Manager 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.

Symbols

Monitoring Connections with Peripherals

func central​Manager(CBCentral​Manager, did​Connect:​ CBPeripheral)

Invoked when a connection is successfully created with a peripheral.

func central​Manager(CBCentral​Manager, did​Fail​To​Connect:​ CBPeripheral, error:​ Error?)

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

Discovering and Retrieving Peripherals

func central​Manager(CBCentral​Manager, did​Retrieve​Connected​Peripherals:​ [CBPeripheral])

Invoked when the central manager retrieves a list of peripherals currently connected to the system.

func central​Manager(CBCentral​Manager, did​Retrieve​Peripherals:​ [CBPeripheral])

Invoked when the central manager retrieves a list of known peripherals.

Monitoring Changes to the Central Manager’s State

func central​Manager​Did​Update​State(CBCentral​Manager)

Invoked when the central manager’s state is updated.

func central​Manager(CBCentral​Manager, will​Restore​State:​ [String :​ Any])

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

Constants

Advertisement Data Retrieval Keys

Keys to specify in an advertisement​Data dictionary.

Relationships

Inherits From