Instance Method

centralManager(_:didConnect:)

Invoked when a connection is successfully created with a peripheral.

Declaration

optional func centralManager(_ central: CBCentralManager, didConnect peripheral: CBPeripheral)

Parameters

central

The central manager providing this information.

peripheral

The peripheral that has been connected to the system.

Discussion

This method is invoked when a call to connect(_:options:) is successful. You typically implement this method to set the peripheral’s delegate and to discover its services.

See Also

Monitoring Connections with Peripherals

func centralManager(CBCentralManager, didDisconnectPeripheral: CBPeripheral, error: Error?)

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

func centralManager(CBCentralManager, didFailToConnect: CBPeripheral, error: Error?)

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

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