Instance Method

player(_:didRequestMatchWithOtherPlayers:)

Initiates a match from Game Center with the requested players.

Declaration

optional func player(_ player: GKPlayer, didRequestMatchWithOtherPlayers playersToInvite: [GKPlayer])

Parameters

player

The GKPlayer object containing the current player’s information.

playersToInvite

An array of GKPlayer objects containing the player identifiers to invite to the match.

Discussion

When this method is called, you should create a new match using the player identifiers provided and present a GKTurnBasedMatchmakerViewController.

See Also

Handling Match-Related Events

func player(GKPlayer, wantsToQuitMatch: GKTurnBasedMatch)

Indicates that the current player wants to quit the current match.

func player(GKPlayer, didRequestMatchWithPlayers: [String])

Initiates a match from Game Center with the requested players.

Deprecated