iOS Developer Library

Developer

GameKit Framework Reference GKChallengeEventHandler Class Reference

Options
Deployment Target:

On This Page

GKChallengeEventHandler

Inherits From


Conforms To


Import Statement


Not Applicable

Objective-C

@import GameKit;

Availability


Available in iOS 6.0 and later
Deprecated in iOS 7.0

The GKChallengeEventHandler class is used to respond to events related to challenges sent or received by the local player.

To use it, call the challengeEventHandler class method to get the singleton instance and assign an object that implements the GKChallengeEventHandlerDelegate protocol to its delegate property. You should assign a challenge event handler immediately after the local player has been authenticated, because your game may have been launched in response to a challenge notification being received by the player.

  • Returns the shared instance of the event handler

    Declaration

    Objective-C

    + (GKChallengeEventHandler *)challengeEventHandler

    Return Value

    An event handler object.

    Discussion

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

    Import Statement

    Objective-C

    @import GameKit;

    Availability

    Available in iOS 6.0 and later

    Deprecated in iOS 7.0

  • delegate delegate (iOS 7.0) Property

    The delegate for the event handler.

    Declaration

    Objective-C

    @property(nonatomic, assign) id< GKChallengeEventHandlerDelegate > delegate

    Discussion

    Only access this property from your game’s main thread.

    Import Statement

    Objective-C

    @import GameKit;

    Availability

    Available in iOS 6.0 and later

    Deprecated in iOS 7.0