Strange GameCenter leak in iOS10

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.

Replies

If you can reproduce the leak with a trivial test project then:

  • you should file a bug about it, including your test project

  • it’s unlikely there will be any workaround

Please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

I've also seen this leak.


hqoova: Have you posted a bug report?

I'm also seeing the same exact leaks in my project in which Game Center works but Instruments displays identical output.


Bug Report Filed:


29119278