Contents

session(_:connectionWithPeerFailed:withError:)

Received by the delegate when an attempt to connect to another peer failed.

Declaration

optional func session(_ session: GKSession, connectionWithPeerFailed peerID: String, withError error: any Error)

Parameters

  • session:

    The session that received the message.

  • peerID:

    A string that uniquely identifies the peer.

  • error:

    The error that occurred.

Discussion

The error parameter can be used to inform the user of why the connection failed.

See Also

Connection Errors