2
votes

I'm getting results to show in the leaderboard in sandbox mode, but I expected each result to appear. Only one result is showing. Is that normal? The sort option to sort from highest to lowest seems to imply multiple results should show up. What does show up is my high score, which does update if the score is surpassed.

Only one result shows whether I present a VC thus:

- (void) presentLeaderboards {
   GKGameCenterViewController* gameCenterController = [[GKGameCenterViewController alloc] init];
   gameCenterController.viewState = GKGameCenterViewControllerStateLeaderboards;
   gameCenterController.gameCenterDelegate = self;
   [self presentViewController:gameCenterController];
}

or if I use the Game Center app.

Here is how I am submitting scores:

-(void) submitScore:(int64_t)score
           category:(NSString*)category {
   if (!_gameCenterFeaturesEnabled) {
      DLog(@"Player not authenticated");
      return;
   }
   GKScore* gkScore =
   [[GKScore alloc]
    initWithLeaderboardIdentifier:category];
   gkScore.value = score;
   [GKScore reportScores:@[gkScore] withCompletionHandler:^(NSError *error) {
      if (error) {
         // handle error
      }
   }];
}
1

1 Answers

1
votes
  1. "The sort option to sort from highest to lowest seems to imply multiple results should show up"

    • This doesn't mean that. It means that all scores submitted (By all Players) will be sorted by Highest to Lowest or Lowest to Highest.
  2. Since you have selected High Score in Leaderboard setup on iTunes Connect. It will update player's score only if it is higher than previous one and will not save other scores submitted.