Creates a connection to another iOS device.
- iOS 3.0–7.0Deprecated
- macOS 10.10–10.10Deprecated
- Mac Catalyst 13.0–13.0Deprecated
- watchOS 3.0–2.0Deprecated
The string that identifies the peer to connect to.
The amount of time to wait before canceling the connection attempt.
When your application is acting as a client, it calls this method to connect to an available peer it discovered. When your application calls this method, a request is transmitted to the remote peer, who chooses whether to accept or reject the connection request.
If the connection to the remote peer is successful, the delegate’s
session(_: method is called for each peer it successfully connected to. If the connection fails or your application cancels the connection attempt, the session calls the delegate’s