November 2011
Beginner
238 pages
6h 19m
English
The friends list is an array of user IDs that you have assigned as friends in Game Center.app. With this data, you can do things such as create a friends list only in game voice channel, or highlight your friends' scores in the global scores list.
We will add a call to retrieve the friends list in our sample project, but won't be doing anything specific with the data in this chapter. For the time being, we will simply print it to the debugger console.
We begin by modifying our Game Center Manager class to add a new method for retrieving the local player's friends list. Add the following method to the implementation.
- (void)retrieveFriendsList;
{
if ([GKLocalPlayer localPlayer].authenticated == YES) { ...