Mapping a Player ID

In the previous section, we learned how to pull down the raw score values of a leaderboard. However, we ended up with a leaderboard that contained only player IDs rather than the aliases (which the user expects to be shown). In this section, we will create a new method that will translate player IDs into player aliases. We will begin this process by adding some new methods to our GameCenterManager class. These will enable searching for a single name and an array of names. Add the following two methods to the GameCenterManager class.

- (void)mapPlayerIDtoPlayer:(NSString*)playerID {         [GKPlayer loadPlayersForIdentifiers: [NSArray arrayWithObject: playerID]                             withCompletionHandler:^(NSArray *playerArray, ...

Get Beginning iOS Game Center and Game Kit: For iPhone, iPad, and iPod touch now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.