GKTurnBasedEventHandler Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/GameKit.framework
Availability
Available in OS X v10.8 and later.
Companion guide
Declared in
GKTurnBasedMatch.h

Overview

The GKTurnBasedEventHandler class is used to respond to important messages related to turn-based matches. To use it, call the sharedTurnBasedEventHandler 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.

This framework has been deprecated in iOS 7. Use GKTurnBasedEventListener.

Subclassing Notes

This class may not be subclassed.

Tasks

Retrieving the Shared Instance

Getting and Setting the Delegate

Properties

delegate

The delegate for the event handler.

@property(assign) NSObject<GKTurnBasedEventHandlerDelegate> *delegate
Discussion

If your game implements turn-based matches, it should set the delegate immediately after the local player is successfully authenticated. You want to set the delegate immediately because your game may have been launched specifically to handle a turn-based match event.

Availability
  • Available in OS X v10.8 and later.
Declared In
GKTurnBasedMatch.h

Class Methods

sharedTurnBasedEventHandler

Returns the shared instance of the event handler.

+ (GKTurnBasedEventHandler *)sharedTurnBasedEventHandler
Return Value

An event handler object.

Discussion

Your game never directly creates a GKTurnBasedEventHandler object. Instead, retrieve the shared instance using this class method.

Availability
  • Available in OS X v10.8 and later.
Declared In
GKTurnBasedMatch.h