iOS 6 Authentication

Although the preceding method of authentication continues to work on iOS 6, Apple has introduced a new streamlined approach to handling authentication on apps that do not need to support iOS 5 or older.

With the new approach, an authenticateHandler block is now used. Errors are captured in the same manner as in the previous examples, but now a viewController can be passed back to your application by Game Center. In the case in which the viewController parameter of the authenticateHandler block is not nil, you are expected to display the viewController to the user.

The first time a new authenticateHandler is set, the app will automatically authenticate. Additionally, the app will automatically reauthenticate on return to the ...

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.