Protocol

GKChallengeListener

An object that responds to challenge events.

Declaration

@protocol GKChallengeListener

Overview

Your app can ignore a challenge, start up in a specific state so the player can respond to a challenge, or notify the original challenger when the local player completes a challenge.

Do not implement GKChallengeListener directly, instead use GKLocalPlayerListener. The GKLocalPlayerListener protocol inherits methods from GKChallengeListener, GKInviteEventListener, GKSavedGameListener, and GKTurnBasedEventListener in order to handle multiple events.

Topics

Responding to a Challenge

- player:didReceiveChallenge:

Called when a player receives a challenge and doesn’t want to address it immediately.

- player:wantsToPlayChallenge:

Called when a player wants to start a game with the intention of completing a challenge.

Completing a Challenge

- player:didCompleteChallenge:issuedByFriend:

Called when the player completes a challenge that was issued by a friend.

- player:issuedChallengeWasCompleted:byFriend:

Called when a friend completes a challenge that was sent to them by the player.

Relationships

Inherits From

See Also

Challenges

GKChallenge

An object representing a challenge issued by the local player to another player.

GKScoreChallenge

An object representing a challenge based on a score in a leaderboard.

GKAchievementChallenge

A challenge sent to another player urging them to complete a specific achievement.