Instance Method

player:didRequestMatchWithPlayers:

Initiates a match from Game Center with the requested players.

Declaration

- (void)player:(GKPlayer *)player didRequestMatchWithPlayers:(NSArray<NSString *> *)playerIDsToInvite;

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

- player:didRequestMatchWithOtherPlayers:

Initiates a match from Game Center with the requested players.

- player:matchEnded:

Called when the match has ended.

- player:wantsToQuitMatch:

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