Iphone 游戏中心:检索分数:零分数对象?

Iphone 游戏中心:检索分数:零分数对象?,iphone,xcode,game-center,Iphone,Xcode,Game Center,我的项目涉及 使用iPhone游戏中心功能的应用程序。在我学习的过程中,我使用了以下Apple文档中的示例: - (void) retrieveTopTenScores { GKLeaderboard *leaderboardRequest = [[GKLeaderboard alloc] init]; if (leaderboardRequest != nil) { leaderboardRequest.playerScope = GKLeaderbo

我的项目涉及 使用iPhone游戏中心功能的应用程序。在我学习的过程中,我使用了以下Apple文档中的示例:

- (void) retrieveTopTenScores
{
     GKLeaderboard *leaderboardRequest = [[GKLeaderboard alloc] init];
     if (leaderboardRequest != nil)
    {
       leaderboardRequest.playerScope = GKLeaderboardPlayerScopeGlobal;
       leaderboardRequest.timeScope = GKLeaderboardTimeScopeToday;
       leaderboardRequest.identifier = @"Combined.LandMaps"
       leaderboardRequest.range = NSMakeRange(1,10);
       [leaderboardRequest loadScoresWithCompletionHandler: ^(NSArray *scores, NSError *error) {
        if (error != nil)
        {
            // Handle the error.
        }
        if (scores != nil)
        {
            // Process the score information.
        }
        }];
}
}
原则上它工作得很好:我得到一个非零分数数组;用一个分数物体

然而,即使游戏中心显示有一个分数,这个分数对象也是零

我已经尝试登录和退出游戏中心,从手机GC刷新一些分数数据,但我仍然可以看到我的分数10.000(作为我自己的GC登录),但每次我尝试以编程方式检索它总是返回null作为分数对象


你能给我一些建议或指示吗

代码运行良好;游戏中心服务器似乎有刷新时间。昨天,分数确实出现在我的手机上,但显然没有在游戏中心服务器上更新。今天早上尝试效果不错,看起来分数数据最终也在服务器上更新了;导致得到一个不再为空的分数

有趣的是,当游戏中心服务器和iPhone不同步时,它仍然返回非零分数数组,只返回GKScore nil结果。。。如果你在游戏中心有几个分数,我想你不会看到零分,而是看到过去几天的分数,而不是最近的分数