Objective c 排行榜分数未显示在游戏中心中
我已经为我的应用创建了一个排行榜。它显示在游戏中心,但分数从未提交 我提交了一份带有以下代码的测试分数:Objective c 排行榜分数未显示在游戏中心中,objective-c,ios7,xcode5,game-center,Objective C,Ios7,Xcode5,Game Center,我已经为我的应用创建了一个排行榜。它显示在游戏中心,但分数从未提交 我提交了一份带有以下代码的测试分数: GKScore* gkScore; // Set the score value gkScore.value = gameTimer; // Send the score to Game Center [gkScore reportScoreWithCompletionHandler:^(NSError* error) {}]; 这是我用来提交适合我的分数的函数 - (void) re
GKScore* gkScore;
// Set the score value
gkScore.value = gameTimer;
// Send the score to Game Center
[gkScore reportScoreWithCompletionHandler:^(NSError* error) {}];
这是我用来提交适合我的分数的函数
- (void) reportScore: (int64_t) reportScore forLeaderboardID: (NSString*) identifier
{
GKScore *scoreReporter = [[GKScore alloc] initWithLeaderboardIdentifier: identifier];
scoreReporter.value = reportScore;
scoreReporter.context = 0;
NSArray *scores = @[scoreReporter];
[GKScore reportScores:scores withCompletionHandler:nil];
}
此外,请确保您的排行榜是实时的或添加到新版本提交中。itunesConnect>你的应用程序>查看新版本的详细信息>游戏中心添加新排行榜(如果尚未添加)