Search code examples
iosgame-centergamekitmultiplayer

Replacing a player in the GKTurnBasedMatch participants property


From Apple's Class Reference, I understand that GKTurnBasedMatch's participants property has a fixed size that is determined at the beginning of the match. Furthermore, I understand the maximum allowed size of participants is 16 players. Is there any way for a player to quit the match and be replaced by another player? In other words, if 16 players join the match, and one quits, can his/her spot be re-filled?

Thanks in advance for your time.


Solution

  • At this time, there is no way to remove a GKTurnBasedParticipant from a GKTurnBasedMatch. Instead, "participantQuit..." and "endMatch..." functions set the participant's status to Done. Thus, the participant is not actually removed from the match, and their slot remains filled.