Adding Scores to Whack-a-Cac

In the preceding section the Game Center Manager component of adding scores to an app was explored. In this section you will learn how to put these additions into practice in Whack-a-Cac. Before proceeding, Game Center must first authenticate a user and specify a delegate. Modify the viewDidLoad method of IFCViewController.m to complete this process.

- (void)viewDidLoad{    [super viewDidLoad];    [[ICFGameCenterManager sharedManager] setDelegate: self];    [[ICFGameCenterManager sharedManager] authenticateLocalUser];}

IFCViewController will also need to respond to the GameCenterManagerDelegate. The first delegate method that needs to be handled is gameCenterLoggedIn:. Since the GameCenterManager ...

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.