Cancels an attempt to connect to a peer.
- iOS 7.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 10.0+
The ID of the nearby peer.
Call this method to cancel connections to peers when you are using your own service discovery code instead of an
MCBrowser object. It should be called in two situations:
If your app calls
connectand later needs to cancel the connection attempt
Peer(_: with Nearby Connection Data:)
If your app has obtained nearby connection data for a peer but you decide not to connect to the peer
For more information, see the Managing Peers Manually section in the overview of the
MCSession class reference.