Instance Method

centralManager:didFailToConnectPeripheral:error:

Tells the delegate the central manager failed to create a connection with a peripheral.

Declaration

- (void)centralManager:(CBCentralManager *)central didFailToConnectPeripheral:(CBPeripheral *)peripheral error:(NSError *)error;

Parameters

central

The central manager that provides this information.

peripheral

The peripheral that failed to connect.

error

The cause of the failure, or nil if no error occurred.

Discussion

The manager invokes this method when a connection initiated with the connectPeripheral:options: method fails to complete. Because connection attempts don’t time out, a failed connection usually indicates a transient issue, in which case you may attempt connecting to the peripheral again.

See Also

Monitoring Connections with Peripherals

- centralManager:didConnectPeripheral:

Tells the delegate that the central manager connected to a peripheral.

- centralManager:didDisconnectPeripheral:error:

Tells the delegate that the central manager disconnected from a peripheral.

- centralManager:connectionEventDidOccur:forPeripheral:

Tells the delegate that a connection event occurred which matches the registered options.