Instance Method

player(_:issuedChallengeWasCompleted:byFriend:)

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

Declaration

optional func player(_ player: GKPlayer, issuedChallengeWasCompleted challenge: GKChallenge, byFriend friendPlayer: GKPlayer)

Parameters

player

The player who originally sent the challenge.

challenge

The challenge that was created and sent.

friendPlayer

The player that completed the challenge.

Discussion

This method is triggered when the game is running or when the user has tapped a challenge notification banner outside of the game.

See Also

Completing a Challenge

func player(GKPlayer, didComplete: GKChallenge, issuedByFriend: GKPlayer)

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