Instance Method

player(_:didComplete:issuedByFriend:)

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

Declaration

optional func player(_ player: GKPlayer, didComplete challenge: GKChallenge, issuedByFriend friendPlayer: GKPlayer)

Parameters

player

The player who completed the challenge.

challenge

The challenge the player completed.

friendPlayer

The friend who originally sent 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, issuedChallengeWasCompleted: GKChallenge, byFriend: GKPlayer)

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