Instance Method

player(_:receivedExchangeReplies:forCompletedExchange:for:)

Called when the exchange is completed.

Declaration

optional func player(_ player: GKPlayer, receivedExchangeReplies replies: [GKTurnBasedExchangeReply], forCompletedExchange exchange: GKTurnBasedExchange, for match: GKTurnBasedMatch)

Parameters

player

The GKPlayer object containing the current player’s information.

replies

An array of GKTurnBasedExchange objects containing the replies from other players.

exchange

A GKTurnBasedExchange object containing the exchange that is completed.

match

The GKTurnBasedMatch object containing the current game data.

Discussion

This method is called when all of the players have either responded to the exchange or timed-out. The result is then sent to the current player and the initiator of the exchange.

See Also

Handling Exchanges