Cancels an active or pending local connection to a peripheral.
- iOS 5.0+
- macOS 10.7+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 4.0+
- Core Bluetooth
The peripheral to which the central manager is either trying to connect or has already connected.
This method is nonblocking, and any
CBPeripheral class commands that are still pending to
peripheral may not complete. Because other apps may still have a connection to the peripheral, canceling a local connection doesn’t guarantee that the underlying physical link is immediately disconnected. From the app’s perspective, however, the peripheral is effectively disconnected, and the central manager object calls the
central method of its delegate object.