Protocol

GKTurnBasedEventHandlerDelegate

The GKTurnBasedEventHandlerDelegate protocol is implemented by an object to receive notifications events for turn-based matches. All methods are called on the main thread.

Overview

This protocol has been deprecated in iOS 7, use GKTurnBasedEventListener.

Topics

Receiving Turn-based Events

func handleInvite(fromGameCenter: [String])

Sent to the delegate when the local player receives an invitation to join a new turn-based match.

Required.

func handleTurnEvent(for: GKTurnBasedMatch)

Sent to the delegate when it is the local player’s turn to act in a turn-based match.

func handleTurnEvent(for: GKTurnBasedMatch, didBecomeActive: Bool)

Sent to the delegate when it is the local player’s turn to act in a turn-based match.

Required.

func handleMatchEnded(GKTurnBasedMatch)

Sent to the delegate when a match the local player is participating in has ended.

See Also

Turn Based Events

class GKTurnBasedEventHandler

The GKTurnBasedEventHandler class is used to respond to important messages related to turn-based matches. To use it, call the shared() class method to get the Singleton instance and assign an object that implements the GKTurnBasedEventHandlerDelegate protocol to its delegate property. All methods are called on the main thread.

Deprecated