game-centergkmatchmaker

For how long are Game Center matches (GKMatch) available?


In iOS 10, the Game Center app is gone, so I'm assuming that it would be a good idea to offer the possibility of deleting matches directly from the app, but does Game Center do some housekeeping on its own?

If users don't delete a match manually, does the match stay listed forever? Would it be a good idea to delete finished or abandoned matches after some time (6 months, maybe)? or does Game Center already do something like it?


Solution

  • Game center doesn't delete any matches, at least, it's never deleted any of my turn-based matches (barring the one big migration from the sandbox GC env, but that was a non-backwards-compatible upgrade, not housekeeping).

    From the very start, though, I've always provided a list of of inprogress matches in the game, allowing users to resume and delete matches. One benefit of this approach: if the user deleted the match from the old game center app, the match just went away. It turns out the match would be deleted but the other players were never notified. Other players were stranded perpetually while waiting for the "deleter" to finish a turn that would never be finished. By managing the deletion inside the app, you can issue the appropriate "quit game" (in-turn, out-of-turn) call to salvage the game for the other players.

    Now that they've removed the game center app, the responsibility to manage the matches does seem to fall entirely to us but I don't think the above trap scenario can happen anymore. I believe that's an improvement. We now don't have to worry about events happening outside our app that we're not aware of and can't recover from.