GKTurnBasedEventListener
The protocol that handles turn-based and data-exchange events between participants in a match.
Declaration
protocol GKTurnBasedEventListenerMentioned in
Overview
To receive the GKTurnBasedEventListener call backs, register your game object with the local player object immediately after initialization.
GKLocalPlayer.local.register(self)Adopt the GKLocalPlayerListener protocol to handle a variety of Game Center events instead of the individual GKChallengeListener, GKInviteEventListener, GKSavedGameListener, and GKTurnBasedEventListener protocols.
Then implement the player(_:receivedTurnEventFor:didBecomeActive:) and other GKTurnBasedEventListener protocol methods to handle turn-based events that occur throughout a match.
Topics
Handling Match-Related Events
player(_:receivedTurnEventFor:didBecomeActive:)player(_:didRequestMatchWithOtherPlayers:)player(_:matchEnded:)player(_:wantsToQuitMatch:)player(_:didRequestMatchWithPlayers:)
Handling Data Exchanges
See Also
Turn-based games
Creating turn-based gamesStarting turn-based matches and passing turns between playersSending messages to players in turn-based gamesExchanging data between players in turn-based gamesGKTurnBasedMatchmakerViewControllerGKTurnBasedMatchGKTurnBasedParticipantGKTurnBasedExchangeGKTurnBasedExchangeReplyGKGameCenterBadgingDisabled