So, I am sending grades to the GC Leaderboards, I am not getting any errors, and the results are apparently being sent, but I still do not see the results listed in the Leaderboards! The leaderboard itself is listed in the Game Center, but there are no results.
According to Google's search and the question here, this can be resolved by trying to register points with multiple accounts. I tried three different accounts now both in Simulator (iOS5) and on my iPhone; not one of them detects errors when sending points.
The code that sends the invoice is here:
- (void)reportScore:(NSString *)identifier score:(int)rawScore { GKScore *score = [[[GKScore alloc] initWithCategory:identifier] autorelease]; score.value = rawScore; [scoresToReport addObject:score]; [self save]; // Save here even though we save again in didEnterBackground, just in case of crash... if (!gameCenterAvailable || !userAuthenticated) return; [self sendScore:score]; } - (void)sendScore:(GKScore *)score { [score reportScoreWithCompletionHandler:^(NSError *error) { dispatch_async(dispatch_get_main_queue(), ^(void) { if (error == NULL) { NSLog(@"Successfully sent score!"); [scoresToReport removeObject:score]; } else { NSLog(@"Score failed to send... will try again later. Reason: %@", error.localizedDescription); } }); }]; }
Chris source share