Contents

matchmakerViewController(_:didReceiveAcceptFromHostedPlayer:)

Called when a player in a hosted match accepts the invitation.

Declaration

optional func matchmakerViewController(_ viewController: GKMatchmakerViewController, didReceiveAcceptFromHostedPlayer playerID: String)

Parameters

  • viewController:

    The view controller that accepted the invitation.

  • playerID:

    The identifier of the accepting player.

Discussion

After a player accepts an invitation, that player’s device should connect to your server. Once the connection is established, your game should call the view controller’s setHostedPlayer(_:connected:) method to update the player’s connection status.

See Also

Deprecated Methods