iOS游戏中心:分数未显示在沙箱中的排行榜上

iOS游戏中心:分数未显示在沙箱中的排行榜上

问题描述:

我正在开发一款支持游戏中心的游戏,而我在沙箱环境中遇到了一个问题。我可以毫无错误地成功报告得分。但是,当我显示排行榜时,没有可见的分数。为了验证分数是否实际到达,我使用以下代码查询本地用户的分数:

I'm developing a Game Center enabled game and I'm running into an issue in the sandbox environment. I can successfully report the score without error. However, when I show the leaderboard, there are no scores visible. To verify that the score actually got there, I query the local user's score with the following code:

-(void)retrieveLocalScoreForCategory:(NSString *)category
{
    GKLeaderboard *leaderboardRequest = [[GKLeaderboard alloc] init];
    leaderboardRequest.category = category;

    [leaderboardRequest loadScoresWithCompletionHandler: ^(NSArray *scores,NSError *error) 
     {
         [self callDelegateOnMainThread: @selector(localPlayerScore:error:) withArg: leaderboardRequest.localPlayerScore error: error];
     }];
}

在我的代表中,我将分数记录到控制台,我可以看到正确的得分到了那里。我已经验证我使用正确的排行榜类别ID(我只有一个)显示排行榜。

In my delegate I log the score to the console and I can see the correct score got there. I have already verified that I'm showing the leaderboard using the correct leaderboard category id (I only have one).

有谁知道为什么我的分数不可见沙箱环境中的排行榜立即出现了吗?在得分出现之前是否有延迟?

Does anyone know why my score isn't visible on the leaderboard in the sandbox environment immediately? Is there a delay before the score shows up?

我遇到了与我合作过的项目相同的问题。

I ran into the same issue with projects I've worked on.

如果排行榜上有两个或更多玩家,GC排行榜(沙盒/直播)将仅返回分数。

The GC Leaderboards (Sandbox/live) will only return scores if there are two or more players on the Leaderboards.

因此,请确保您在一台设备上提交2个不同的帐户,或在不同的设备上提交2个不同的帐户。

So make sure you either submit the score with 2 different accounts on one 1 device or 2 different accounts on separate devices.