title: GameCenter Multiplayer Stuck on "Starting Game..."
body: <p>I am currently working on my game and I have decided to enable multiplayer via GameCenter in the Game to allow users to play their friend. I have followed a tutorial by <a href="http://www.raywenderlich.com/60980/game-center-tutorial-how-to-make-a-simple-multiplayer-game-with-sprite-kit-part-1" rel="noreferrer">RayWinderLinch</a>, but ran into a problem. </p>
  
  <p>My problem is that when I load up the <code>GKMatchMakingViewController</code> and hit the big <code>Play Now</code> button on both devices it will find each other (which is meant to happen) and under the set game center user name it will say <code>Ready</code>. </p>
  
  <p>This means that GameCenter has found each player and is ready to start the match which it should, but in my case the match never begins. It is stuck on a loop that says <code>Starting Game...</code> and nothing happens. It appears that the </p>
  
  <p><code>func matchmakerViewController(viewController: GKMatchmakerViewController!, didFindMatch theMatch: GKMatch!)</code></p>
  
  <p>and the</p>
  
  <p><code>func match(theMatch: GKMatch!, player playerID: String!, didChangeState state: GKPlayerConnectionState)</code></p>
  
  <p>method's are never ran. I am completely lost on what is going on. I have tried this many times over and over to fix the problem but nothing worked. I will attach an image that show's the screen of the application where my problem persists and I will also attach the code I am using. </p>
  
  <blockquote>
    <p>I am using a framework based of of the <code>GameKitHelper.h</code> In the
    mentioned tutorial above. It is written in swift and is called
    <a href="https://github.com/jackcook/GCHelper" rel="noreferrer">GCHelper</a></p>
  </blockquote>
  
  <p><strong><em>Code</em></strong></p>
  
  <p><em>The code for GCHelper can be found using the GitHub link mention earlier</em></p>
  
  <blockquote>
    <p>I have cut out code that is unnecessary for this problem</p>
  </blockquote>
  
  <pre><code> class GameScene : SKScene, GameKitHelper, MultiplayerNetworkingProtocol {
  
       override func didMoveToView () {
  
            GCHelper().authenticateLocalUser() //Authenticate GameCenter User
            println("\n \n \n Authenticating local user \n \n \n")
  
       }
  
        func startMultiplayer () {
  
             var vc = self.view?.window?.rootViewController
             GameKitHelper().findMatchWithMinPlayers(2, maxPlayers: 2, viewController: vc!, delegate: self); //Find match and load GKMatchMakerViewController
  
        }
  
         func matchStarted() {
  
             //Delegate method
             println("match started")
  
         }
  
         func matchEnded() {
  
             //Delegate method
             println("match ended")
  
         }
  
          func match(match: GKMatch, didReceiveData: NSData, fromPlayer: String){
          //Delegate Method
          println("Did receive data")
  
  }
  
  
       override func touchesBegan(touches: Set&lt;NSObject&gt;, withEvent event: UIEvent) {
  
           for touch in (touches as! Set&lt;UITouch&gt;) {
          let location = touch.locationInNode(self)
  
  
          if self.nodeAtPoint(location) == multiplayer //SKSpriteNode {
  
               //User clicked on multiplayer button, launch multiplayer now!
               println("Loading multiplayer")
               startMultiplayer()
        }
  
   }
  </code></pre>
  
  <p><strong><em>Image</em></strong></p>
  
  <p><a href="https://i.stack.imgur.com/pIR7b.png" rel="noreferrer"><img src="https://i.stack.imgur.com/pIR7b.png" alt="Game center finds each player and is ready to start the match but then it get&#39;s stuck on Starting Game..."></a></p>
  
  <blockquote>
    <p>UPDATE</p>
  </blockquote>
  
  <p>I have noticed that when I test using my iPhone and the simulator, on the iPhone the status will go from <code>Ready</code> to <code>Disconnected</code> but on the simulator the status is still <code>Ready</code> and then I will get the following message in the console for the iPhone</p>
  
  <blockquote>
    <p>Warning matchmakerViewController:didFindMatch: delegate method not implemented`</p>
  </blockquote>
  
  <p>Even though it is implemented in the <code>GCHelper.swift</code> file. This does not happen when I test on my iPhone and iPad Mini it just keeps on saying <code>Starting Game...</code></p>
  
  <p>Any help will be appreciated.</p>