Protocol

GKTurnBasedEventListener

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

Declaration

@protocol GKTurnBasedEventListener

Overview

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

Topics

Handling Exchanges

- player:receivedExchangeCancellation:forMatch:

Called when the exchange is cancelled by the sender.

- player:receivedExchangeRequest:forMatch:

Called when a player receives an exchange request from another player.

Handling Match-Related Events

- player:didRequestMatchWithOtherPlayers:

Initiates a match from Game Center with the requested players.

- player:matchEnded:

Called when the match has ended.

- player:wantsToQuitMatch:

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

- player:didRequestMatchWithPlayers:

Initiates a match from Game Center with the requested players.

Deprecated

Relationships

See Also

Turn-based Games

GKTurnBasedMatch

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

GKTurnBasedExchange

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

GKTurnBasedExchangeReply

The player’s response to an exchange.

GKTurnBasedParticipant

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