Interface GKChallengeListener

    • Method Detail

      • playerDidCompleteChallengeIssuedByFriend

        default void playerDidCompleteChallengeIssuedByFriend​(@NotNull
                                                              @NotNull GKPlayer player,
                                                              @NotNull
                                                              @NotNull GKChallenge challenge,
                                                              @NotNull
                                                              @NotNull GKPlayer friendPlayer)
        Called when a player has completed a challenge, triggered while the game is running, or when the user has tapped a challenge notification banner while outside of the game. player: The player who completed the challenge challenge: The challenge which the player completed friendPlayer: The friend who sent the challenge originally API-Since: 7.0
      • playerDidReceiveChallenge

        default void playerDidReceiveChallenge​(@NotNull
                                               @NotNull GKPlayer player,
                                               @NotNull
                                               @NotNull GKChallenge challenge)
        Called when a player has received a challenge, triggered by a push notification from the server. Received only while the game is running. player: The player who received the challenge challenge: The challenge which was received API-Since: 7.0
      • playerIssuedChallengeWasCompletedByFriend

        default void playerIssuedChallengeWasCompletedByFriend​(@NotNull
                                                               @NotNull GKPlayer player,
                                                               @NotNull
                                                               @NotNull GKChallenge challenge,
                                                               @NotNull
                                                               @NotNull GKPlayer friendPlayer)
        Called when a player's friend has completed a challenge which the player sent to that friend. Triggered while the game is running, or when the user has tapped a challenge notification banner while outside of the game. player: The player who sent the challenge originally challenge: The challenge which the player created and sent friendPlayer: The friend who completed the challenge API-Since: 7.0
      • playerWantsToPlayChallenge

        default void playerWantsToPlayChallenge​(@NotNull
                                                @NotNull GKPlayer player,
                                                @NotNull
                                                @NotNull GKChallenge challenge)
        Called when a player starts the game with the intent of playing a challenge, or intends to play a challenge after selecting it within the in-game Game Center UI. player: The player who selected the challenge challenge: The challenge which was selected API-Since: 7.0