游戏中心排行榜显示一个结果

我已经使用不同的测试帐户向排行榜发送了分数,但是当我尝试查看排行榜时,我只能看到我登录的帐户的分数。我使用此代码发送分数:

- (void)reportScore:(int64_t)score forLeaderboardID:(NSString*)identifier { GKScore *scoreReporter = [[GKScore alloc] initWithLeaderboardIdentifier: @"GHS"]; scoreReporter.value = score; scoreReporter.context = 0; [GKScore reportScores:@[scoreReporter] withCompletionHandler:^(NSError *error) { if (error == nil) { NSLog(@"Score reported successfully!"); } else { NSLog(@"Unable to report score!"); } }]; } 

这是我用来显示排行榜的代码:

 - (void)showLeaderboardOnViewController:(UIViewController*)viewController { GKGameCenterViewController *gameCenterController = [[GKGameCenterViewController alloc] init]; if (gameCenterController != nil) { gameCenterController.gameCenterDelegate = self; gameCenterController.viewState = GKGameCenterViewControllerStateLeaderboards; gameCenterController.leaderboardIdentifier = _leaderboardIdentifier; [viewController presentViewController: gameCenterController animated: YES completion:nil]; } } 

也许是因为它是沙盒和东西? 这是正常的吗? 谢谢

我在搜索之前和之后遇到过这个问题,沙盒帐户似乎是个错误。 我将我的桌子分成了有史以来最高的,今天最高和最高的朋友,在每种情况下,我的其他沙盒帐户的其他更高分数被忽略。 当我作为朋友添加我的另一个帐户时,他们开始分享得分很好。

我使用的代码或多或少与您自己的代码相同,并提交到接受它的App Store,现在它可以正常使用真实帐户。