Common Authentication Errors

There are several common cases that can be helpful to catch when dealing with authentication errors. The following method is a modified version of authenticateLocalUser with additional error handling built in.

Note

If you are receiving an alert that says your game is not recognized by Game Center, check to make sure that the bundle ID of your app matches the one configured in iTunes Connect. A new app might take a few hours to have Game Center fully enabled, and a lot of Game Center problems can be resolved by waiting a little while and retrying.

- (void) authenticateLocalUser{    if([GKLocalPlayer localPlayer].authenticated == NO)    {         [[GKLocalPlayer localPlayer] authenticateWithCompletionHandler ...

Get iOS Components and Frameworks: Understanding the Advanced Features of the iOS SDK now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.