Instance Method


Establishes a local connection to a peripheral.


- (void)connectPeripheral:(CBPeripheral *)peripheral options:(NSDictionary<NSString *,id> *)options;



The peripheral to which the central is attempting to connect.


A dictionary to customize the behavior of the connection. For available options, see Peripheral Connection Options.


After successfully establishing a local connection to a peripheral, the central manager object calls the centralManager:didConnectPeripheral: method of its delegate object. If the connection attempt fails, the central manager object calls the centralManager:didFailToConnectPeripheral:error: method of its delegate object instead. Attempts to connect to a peripheral don’t time out. To explicitly cancel a pending connection to a peripheral, call the cancelPeripheralConnection: method. Deallocating peripheral also implicitly calls cancelPeripheralConnection:.

See Also

Establishing or Canceling Connections with Peripherals

Peripheral Connection Options

Keys used to pass options when connecting to a peripheral.

- cancelPeripheralConnection:

Cancels an active or pending local connection to a peripheral.