Contents

GKTurnBasedEventListener

The protocol that handles turn-based and data-exchange events between participants in a match.

Declaration

protocol GKTurnBasedEventListener

Mentioned 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

Handling Data Exchanges

See Also

Turn-based games