Game Center Player Authentication

How do I authenticate the GKLocalPlayer in Game Center.
Answered by Graphics and Games Engineer in 615877022
You can change it to objective-C by choosing 'objective-C' in the pull down menu under language, in the top bar of the page.
As early as you can in your application, you want to set the authentication handler on the shared instance of the local player.
Retrieve the shared instance of the local player by calling the local class method and set its authenticateHandlerproperty.
You can find best practices on how to setup your authentication handler in the documentation:
https://developer.apple.com/documentation/gamekit/gklocalplayer/1515399-authenticatehandler

The code in the documentation is a bit confusing for me as it is written in Swift 2. Is it possible for you to convert so I can directly use it.
Accepted Answer
You can change it to objective-C by choosing 'objective-C' in the pull down menu under language, in the top bar of the page.
Ok Thanks a lot 😃
Game Center Player Authentication
 
 
Q