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. More...

Inheritance


Conforms To


Import Statement


Not Applicable @import GameKit;

Availability


Available in iOS 5.0 and later.
Deprecated in iOS 7.0.
  • Returns the shared instance of the event handler.

    Declaration

    Objective-C

    + (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.

    Import Statement

    Availability

    Available in iOS 5.0 and later.

    Deprecated in iOS 7.0.

  • delegate delegate (iOS 7.0) Property

    The delegate for the event handler.

    Declaration

    Objective-C

    @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.

    Import Statement

    Availability

    Available in iOS 5.0 and later.

    Deprecated in iOS 7.0.