Establishes a local connection to a peripheral.
- iOS 5.0+
- macOS 10.7+
- tvOS 9.0+
- watchOS 4.0+
- Core Bluetooth
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.
If a local connection to a peripheral is successfully established, the central manager object calls the
central method of its delegate object. If the connection attempt fails, the central manager object calls the
central method of its delegate object instead. Attempts to connect to a peripheral do not time out. To explicitly cancel a pending connection to a peripheral, call the
cancel method. The
cancel method is implicitly called when
peripheral is deallocated.