Instance Method

match:shouldReinvitePlayer:

Called when a player in a two-player match was disconnected.

Declaration

- (BOOL)match:(GKMatch *)match shouldReinvitePlayer:(NSString *)playerID;

Parameters

match

The match that lost the player.

playerID

The identifier for the player whose connection failed.

Return Value

Your game should return YES if it wants Game Kit to attempt to reconnect the player, NO if it wants to terminate the match.

Discussion

Occasionally, players may get disconnected from a match. If your game implements this method in the match delegate and the match only contains two players, Game Kit calls this method after a player gets disconnected. If your delegate allows Game Kit to reconnect to the other player, it reconnects the other player. Your match:player:didChangeState: method is called when the other player is reconnected.

See Also

Deprecated Methods and Properties

- match:player:didChangeState:

Called when a player connects to or disconnects from the match.

Deprecated
- match:didReceiveData:fromPlayer:

Called when data is received from a player.

Deprecated

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software