The protocol you implement to handle exchanges and match-related events for turn-based games.


protocol GKTurnBasedEventListener


Do not implement GKTurnBasedEventListener directly, instead use GKLocalPlayerListener. The GKLocalPlayerListener protocol inherits methods from GKTurnBasedEventListener, GKInviteEventListener, and GKChallengeListener in order to handle multiple events.


Handling Match-Related Events

func player(GKPlayer, didRequestMatchWithOtherPlayers: [GKPlayer])

Initiates a match from Game Center with the requested players.

func player(GKPlayer, wantsToQuitMatch: GKTurnBasedMatch)

Indicates that the current player wants to quit the current match.

func player(GKPlayer, didRequestMatchWithPlayers: [String])

Initiates a match from Game Center with the requested players.



See Also

Turn-based Games

class GKTurnBasedMatch

An object used to implement turn-based matches between sets of players on Game Center.

class GKTurnBasedExchange

The exchange information sent between players even when a player is not the current player.

class GKTurnBasedExchangeReply

The player’s response to an exchange.

class GKTurnBasedParticipant

The information that describes a participant in a turn-based match.