Instance Method

player(_:didRequestMatchWithPlayers:)

Initiates a match from Game Center with the requested players.

Declaration

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

Parameters

player

The GKPlayer object containing the current player’s information.

playerIDsToInvite

An array of NSString 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, didRequestMatchWithOtherPlayers: [GKPlayer])

Initiates a match from Game Center with the requested players.

func player(GKPlayer, wantsToQuitMatch: GKTurnBasedMatch)

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