setHostedPlayer(_:didConnect:)
Updates the connection status of a player in a hosted game.
Declaration
func setHostedPlayer(_ player: GKPlayer, didConnect connected: Bool)Parameters
- player:
The player whose status changed.
- connected:
A Boolean value that indicates whether the player connected or disconnected from the hosted match.
Mentioned in
Discussion
When you connect or disconnect a player from your server in a hosted game, use this method to update the player’s status that appears in the matchmaker view controllers on other player’s devices. For example, invoke this method after you connect a player from the matchmakerViewController(_:hostedPlayerDidAccept:) delegate method.