November 2011
Beginner
238 pages
6h 19m
English
Game Center provides a method to query for recent player activity. Your users will often want as much information as possible about how long of a wait they could experience while looking for a multiplayer match. It is important to establish that player activity is recent activity and not current activity. There is no Apple-provided method for determining exactly how many players are waiting for a match, but Apple does provide a way to determine how many users have recently looked for a match. Let's take a look at the required source code to get player activity. Add the following two new methods to your GameCenterManager class's implementation file.
- (void)findAllActivity
{ [[GKMatchmaker sharedMatchmaker] queryActivityWithCompletionHandler: ...