GKChallengeEventHandler Class Reference

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

Overview

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.

Tasks

Retrieving the Shared Instance

Getting and Setting the Delegate

Properties

delegate

The delegate for the event handler.

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

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

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

Class Methods

challengeEventHandler

Returns the shared instance of the event handler

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

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