Instance Method

player(_:didRequestMatchWithPlayers:)

Called when the local player starts a match with another player from Game Center.

Declaration

optional func player(_ player: GKPlayer, didRequestMatchWithPlayers playerIDsToInvite: [String])

Parameters

player

The GKPlayer object that identifies the player associated with the invitation.

playerIDsToInvite

An array of NSString objects containing the player identifiers invited to the match.

Discussion

When this method is called, the game is launched from Game Center and starts the matchmaking process.

See Also

Starting a New Match

func player(GKPlayer, didAccept: GKInvite)

Called when another player accepts a match invite from the local player.

func player(GKPlayer, didRequestMatchWithRecipients: [GKPlayer])

Called when the local player starts a match with another player from Game Center.