In the viewDidLoad I am using this seemingly simple code to authenticate the player.
let localPlayer = GKLocalPlayer.localPlayer()
localPlayer.authenticateHandler = {(viewController, error) -> Void in
if viewController != nil {
// Show the viewcontroller to let the player log in to GameCenter
self.present(viewController!, animated: true, completion: nil)
}
else if localPlayer.isAuthenticated {
//Start using GameCenter
}
else {
//Dont use GameCenter
}
}
And for some reason, with iOS10 I am now experiencing these GameCenterFoundation leaks:
http://i.stack.imgur.com/oGEJy.png
I even tried creating a new empty project, and the code above creates the same leaks. I did not experience these leaks with Swift 2 and iOS9.
Any help would be MUCH appreciated.