O'Reilly logo

Beginning iOS Game Center and Game Kit: For iPhone, iPad, and iPod touch by Kyle Richter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Authenticating with Game Center

Once your app has determined whether the device is Game Center–capable, you can authenticate the user. The user who is authenticated with Game Center will always be referred to as the local player and will be represented by the class GKLocalPlayer. Before any other Game Center functionality can be used, you must first authenticate a local player.

Apple recommends that you authenticate with Game Center as early as possible in your app. The primary reason to authenticate before the user needs to access any Game Center behavior is to ensure that the user is not waiting for the network callbacks to authenticate a user at a time when he or she wants to perform a Game Center action. Early authentication also makes sure ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required