With GameKit when I run
localPlayer = GKLocalPlayer.local localPlayer.authenticateHandler = { viewController, error in }