I have a turn-based match with two participants, A and B. It is currently A's turn. B quits out of turn by calling:
[match participantQuitOutOfTurnWithOutcome:GKTurnBasedMatchOutcomeQuit ... etc.
As far as A's Game Center app is concerned, the match with B is still in play – the match status is GKTurnBasedMatchStatusOpen
, and the match outcomes are GKTurnBasedMatchOutcomeNone
and GKTurnBasedMatchOutcomeQuit
respectively.
From the documentation, it appears that participant A should detect this and call:
participantA.matchOutcome = GKTurnBasedMatchOutcomeWon;
participantB.matchOutcome = GKTurnBasedMatchOutcomeQuit;
[self endMatchInTurnWithMatchData: ... etc.
However, there seems to be no notification for participantQuitOutOfTurnWithOutcome
, and periodically iterating through each match to end turns feels like a kludge.
What is the correct approach to ending these matches?