GameCenter不更新排行榜

使用沙盒Gamecenter。

无论我做什么,分数都不会出现在排行榜上。

我正在使用下面的代码:

- (void)scoreReported: (NSError*) error { NSLog(@"%@",[error localizedDescription]); } - (void)submitScore{ if(self.currentScore > 0) { NSLog(@"Score: %lli submitted to leaderboard %@", self.currentScore, self.currentLeaderBoard); [gameCenterManager reportScore: self.currentScore forCategory: self.currentLeaderBoard]; } } 

scoreReported不会产生错误,但分数不出现在排行榜。 我知道该类别是正确的,因为我使用currentLeaderBoard:

 - (void)showLeaderboard { NSLog(@"leaderboard = %@", self.currentLeaderBoard); GKLeaderboardViewController *leaderboardController = [[GKLeaderboardViewController alloc] init]; if (leaderboardController != NULL) { leaderboardController.category = self.currentLeaderBoard; //leaderboardController.category = nil; leaderboardController.timeScope = GKLeaderboardTimeScopeWeek; leaderboardController.leaderboardDelegate = self; [self presentModalViewController: leaderboardController animated: YES]; } } 

我已经尝试了通常的2个不同的沙箱GC帐户,以获得排行榜的工作甚至尝试了4个不同的GC帐户,每个在模拟器(iOS 6.1)和设备(iOS 6.0.1)上login,但仍然没有快乐

任何build议 – 或者只是沙盒游戏中心太多了! (我会提出一个关于沙箱的bug,但是苹果bug报告表单有一个bug,所以也不能工作)

对于我来说,即使在沙盒模式下,对于游戏中心的分数报告也几乎立即生效。

以下是您可以尝试的几件事情

  1. 确保报告分数时排行榜标识符正确(应与iTunesConnect中的“排行榜ID”完全一致)
  2. 尝试在iTunesConnect的“pipe理游戏中心”部分下删除testing数据
  3. 删除应用程序,在您的设备上启动“游戏中心”应用程序,并转到“游戏”选项卡,并删除您的应用程序。 重新安装应用程序,然后再次尝试报告分数。
  4. 确保[gkScore reportScoreWithCompletionHandler:^(NSError * error)不会返回任何错误

对于那些想知道这个我改变了我的submitScore方法:

  - (void)submitScore { GKScore * GCscore = [[GKScore alloc] initWithCategory:self.currentLeaderBoard]; GCscore.value = [[NSUserDefaults standardUserDefaults] integerForKey:@"NEWSCORE"]; [GCscore reportScoreWithCompletionHandler:^(NSError *error) { dispatch_async(dispatch_get_main_queue(), ^(void) { if (error == NULL) { NSLog(@"Score Sent"); } else { NSLog(@"Score Failed, %@",[error localizedDescription]); } }); }]; } 

它的工作