Instance Method

match(_:player:didChange:)

Called when a player connects to or disconnects from the match.

Declaration

optional func match(_ match: GKMatch, player playerID: String, didChange state: GKPlayerConnectionState)

Parameters

match

The match that the player is connected to.

player

The identifier for the player whose state changed.

state

The state the player moved to.

Discussion

Your game implements this method to be notified when players connect to or disconnect from the match.

See Also

Deprecated Methods and Properties

func match(GKMatch, didReceive: Data, fromPlayer: String)

Called when data is received from a player.

Deprecated
func match(GKMatch, shouldReinvitePlayer: String) -> Bool

Called when a player in a two-player match was disconnected.

Deprecated