How to deal with lag spike from gamecenter
<p>My game uses Game Center for scoreboards.  At the start of the app I ask Game Center to login. </p>

<p>The problem is that after a variable amount of time Game Center pops up with its "welcome back...." thing and this creates a HUGE latency spike in my app that is already low on resources.</p>

<p>I have played with the completion handlers trying to find out some sort of callback when the banner is done... but nothing!</p>

<p>How am I supposed to handle this? I have a loading screen, could I perhaps not finish loading until the thing has popped up?</p>

<p>Here is my code I use right now</p>

<pre><code>func authenticateLocalPlayer()
    {
        Holder.loggedIn = false
        print("Start Authenticate")
        let localPlayer = GKLocalPlayer.localPlayer()
        localPlayer.authenticateHandler = {(viewController, error) -&gt; Void in
            if (viewController != nil)
            {
                self.presentViewController(viewController!, animated: false, completion: {self.authenticated()})
            }
        }
    }
</code></pre>