Contents

peerPickerController(_:didConnectPeer:to:)

Tells the delegate that the controller connected a peer to the session.

Declaration

optional func peerPickerController(_ picker: GKPeerPickerController, didConnectPeer peerID: String, to session: GKSession)

Parameters

  • picker:

    The controller that connected the peer.

  • peerID:

    The identification string for the peer that connected to the session.

  • session:

    The session that the peer is connected to.

Discussion

Once a peer is connected to the session, your application should take ownership of the session, dismiss the peer picker, and then use the session to communicate with the other peer.