Package apple.gamekit.protocol
Interface GKChallengeEventHandlerDelegate
-
public interface GKChallengeEventHandlerDelegateGKChallengeEventHandler's delegate must implement the following protocol to be notified of challenge-related events. All of these methods are called on the main thread.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voidlocalPlayerDidCompleteChallenge(GKChallenge challenge)Called when the local player has completed one of their challenges, triggered by a push notification from the server.default voidlocalPlayerDidReceiveChallenge(GKChallenge challenge)Called when the local player has received a challenge, triggered by a push notification from the server.default voidlocalPlayerDidSelectChallenge(GKChallenge challenge)Called when the user taps a challenge notification banner or the "Play Now" button for a challenge inside Game Center, causing the game to launch.default voidremotePlayerDidCompleteChallenge(GKChallenge challenge)Called when a non-local player has completed a challenge issued by the local player.default booleanshouldShowBannerForLocallyCompletedChallenge(GKChallenge challenge)If the method returns YES, a challenge banner (like an achievement or welcome banner -- not a notification center banner) is displayed.default booleanshouldShowBannerForLocallyReceivedChallenge(GKChallenge challenge)If the method returns YES, a challenge banner (like an achievement or welcome banner -- not a notification center banner) is displayed when a challenge is received in-game for the local player.default booleanshouldShowBannerForRemotelyCompletedChallenge(GKChallenge challenge)If the method returns YES, a challenge banner (like an achievement or welcome banner -- not a notification center banner) is displayed.
-
-
-
Method Detail
-
localPlayerDidCompleteChallenge
default void localPlayerDidCompleteChallenge(GKChallenge challenge)
Called when the local player has completed one of their challenges, triggered by a push notification from the server. Received only while the game is running.
-
localPlayerDidReceiveChallenge
default void localPlayerDidReceiveChallenge(GKChallenge challenge)
Called when the local player has received a challenge, triggered by a push notification from the server. Received only while the game is running.
-
localPlayerDidSelectChallenge
default void localPlayerDidSelectChallenge(GKChallenge challenge)
Called when the user taps a challenge notification banner or the "Play Now" button for a challenge inside Game Center, causing the game to launch. Also called when the user taps a challenge banner inside the game.
-
remotePlayerDidCompleteChallenge
default void remotePlayerDidCompleteChallenge(GKChallenge challenge)
Called when a non-local player has completed a challenge issued by the local player. Triggered by a push notification from the server. Received when a challenge notification banner is tapped, or while the game is running.
-
shouldShowBannerForLocallyCompletedChallenge
default boolean shouldShowBannerForLocallyCompletedChallenge(GKChallenge challenge)
If the method returns YES, a challenge banner (like an achievement or welcome banner -- not a notification center banner) is displayed. If NO, then no banner is displayed. Default behavior for non-implementing apps is YES.
-
shouldShowBannerForLocallyReceivedChallenge
default boolean shouldShowBannerForLocallyReceivedChallenge(GKChallenge challenge)
If the method returns YES, a challenge banner (like an achievement or welcome banner -- not a notification center banner) is displayed when a challenge is received in-game for the local player. If NO, then no banner is displayed, and localPlayerDidSelectChallenge: will not be called for that challenge. Default behavior for non-implementing apps is YES.
-
shouldShowBannerForRemotelyCompletedChallenge
default boolean shouldShowBannerForRemotelyCompletedChallenge(GKChallenge challenge)
If the method returns YES, a challenge banner (like an achievement or welcome banner -- not a notification center banner) is displayed. If NO, then no banner is displayed. Default behavior for non-implementing apps is YES.
-
-