How to handle a disconnected player in a real-time match

Hi.

Are there best practices in terms of how I should handle a disconnected player in a real-time match? In my app, once a player goes to background, he/she gets disconnected and the player is marked as temporarily unavailable on other players' devices. Is there any way that the disconnected player can return back to the same game when he/she becomes active again? It sounds a bit counterproductive to stop the whole match if one player has to disconnect quickly, for example to answer a call.

Thank you!
  • Any work around to restore disconnect player? I don't see any API to allow a disconnected player to reconnect to the previous GKMatch Session. If there is a way to get a GKMatch Session id and have a GKMatchmaker method to restore connection, it will be nice. For example...

    (void)reconnectMatchForMatchId:(NSString *)matchId withCompletionHandler:(void(^__nullable)(GKMatch * __nullable match, NSError * __nullable error))completionHandler;
Add a Comment