title: Game Center Login Swift
body: <p>I am trying to integrate game center into my app.  I have spent lots of time trying to figure this out and need some help.  This is what I have so far:</p>
  
  <pre><code>func login() {
      println("login called")
      var localPlayer = GKLocalPlayer()
      localPlayer.authenticateHandler = {(viewController: UIViewController!, error: NSError!) -&gt; Void in
          if viewController != nil {
              println("VC True")
              self.presentViewController(viewController, animated: true, completion: nil)
  
          }else if GKLocalPlayer.localPlayer().authenticated{
  
              //WHAT HERE?
          }
      }
  }
  </code></pre>
  
  <p>I made a login function that I call in the view did load.</p>
  
  <p>Thanks for the help.</p>