title: Why is match.rematch returning 0 players in Game Center peer-to-peer game?
body: <p>There's a <a href="https://stackoverflow.com/questions/13052638/trouble-using-the-new-rematchwithcompletionhandler-method-from-game-center">[similar question from '12]<a href="https://stackoverflow.com/questions/13052638/trouble-using-the-new-rematchwithcompletionhandler-method-from-game-center">1</a></a>, but it's turn-by-turn game (may or may not make difference), it was not resolved, and there've possibly been Game Center/GameKit changes since them.</p>
  
  <p>Simple case is two players on iOS, and both tap a button that executes this code (<code>currentMatch</code> is a class property <code>GKMatch?</code>):</p>
  
  <pre><code>    if let match = currentMatch {
          print("create rematch completion handler")
          match.rematch(completionHandler: {(newMatch, error) in
              print("execute rematch completion handler")
              if let error = error {
                  print(error)
              }
              if let newMatch = newMatch {
                  print("rematch completed \(newMatch.players.count)")
                  self.currentMatch = newMatch
              }
          })
      }
  </code></pre>
  
  <p>The log returns:</p>
  
  <pre><code>create rematch completion handler
  match did change state ‎“‪Player2” 2
  disconnected from ‎“‪Player2”
  execute rematch completion handler
  rematch completed 0
  </code></pre>
  
  <p>Thus, GameKit is disconnecting the players on its own, executing the completion handler, and seemingly creating a new match with 0 players.</p>
  
  <p>Any suggestions on what to do differently to have the rematch with the original players? Has anyone ever had this work? Thanks.</p>