Only one result showing in Game Center leaderboard sandbox - normal?

爱⌒轻易说出口 提交于 2019-12-12 18:32:50

问题


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. "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.



来源:https://stackoverflow.com/questions/22106898/only-one-result-showing-in-game-center-leaderboard-sandbox-normal

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!