I'm trying to make a Game Center leaderboard for my app. I've been following the steps from Apple and following the sample code from GKTapper, but I can't get any scores to show in Game Center. I've set up the leaderboard in iTunes Connect. Here's the code that reports the score:
- (void) reportScore: (int64_t) score forCategory: (NSString *) category {
GKScore *scoreReporter = [[[GKScore alloc] initWithCategory:category] autorelease];
scoreReporter.value = score;
[scoreReporter reportScoreWithCompletionHandler:^(NSError *error) {
if (error != nil)
{
UIAlertView* alert= [[[UIAlertView alloc] initWithTitle: @"Score Report Failed!" message: [NSString stringWithFormat: @"Reason: %@", [error localizedDescription]] delegate: self cancelButtonTitle: @"Try Again..." otherButtonTitles: NULL] autorelease];
[alert show];
}
}];
}
The code seems to run fine. The alert is never shown. But, when I go into Game Center, the leaderboard is blank. I'm running Xcode 4.2 and iOS 5. Any ideas?