iOS Developer Library

Developer

GameKit Framework Reference GKTurnBasedEventHandler Class Reference

Options
Deployment Target:

On This Page

GKTurnBasedEventHandler

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.

  • Returns the shared instance of the event handler.

    Declaration

    + (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 iOS 5.0 and later.

    Deprecated in iOS 7.0.

  • delegate (iOS 7.0) Property

    The delegate for the event handler.

    Declaration

    @property(assign, nonatomic) 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 iOS 5.0 and later.

    Deprecated in iOS 7.0.