player(_:receivedTurnEventFor:didBecomeActive:)
Handles turn-based match events, such as accepting invitations, passing turns, and saving match data.
Declaration
optional func player(_ player: GKPlayer, receivedTurnEventFor match: GKTurnBasedMatch, didBecomeActive: Bool)Parameters
Mentioned in
Discussion
GameKit invokes this method when these turn-based events occur:
GameKit passes the turn to the player.
The player accepts an invitation from another participant.
The timeout for the player to take their turn is about to expire.
A participant saves match data to Game Center.
Another participant sends a reminder to the player.
The player opens an existing or completed match.
The player forfeits a match.