iOS Components and Frameworks: Understanding the Advanced Features of the iOS SDK
by Kyle Richter, Joe Keeley
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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access