November 2011
Beginner
238 pages
6h 19m
English
Before a leaderboard provides any useful functionality, we need to populate it with some score data. We begin this process by modifying our GameCenterManager class once again. Add the following method to the implementation; it should look very familiar as it follows the same pattern that we used when we implemented the authentication methods.
- (void) reportScore: (int64_t) score forCategory: (NSString*) category
{
GKScore *scoreReporter = [[[GKScore alloc] initWithCategory:category]
autorelease];
scoreReporter.value = score;
[scoreReporter report ScoreWithCompletionHandler: ^(NSError *error) { ...