GameKit排行榜GKScore initWithCategory - 为"类别"指定什么

RSH*_*SH1 1 iphone objective-c gamekit

我正在尝试为我的游戏设置排行榜,但我不知道要传递给GKScore:initWithCategory.在Itunes Connect中查看"排行榜参考名称"和"排行榜ID"这两个我已经尝试过,但现在游戏中心仍会显示分数.

在ITC中没有提到"类别",术语是否已更改?我将什么传递给这个功能?

dma*_*iii 5

您需要传递的值在iTunes Connect排行榜部分标记为排行榜ID.

更新:我使用以下内容向排行榜提交高分,其中类别是iTunes Connect中指定的LeaderBoard ID

    GKScore *scoreReporter = [[[GKScore alloc] initWithCategory:@"yourLeaderBoardId"] autorelease];
    scoreReporter.value = score;

    [scoreReporter reportScoreWithCompletionHandler:^(NSError *error) 
    {
        if (error != nil)
        {
            // handle the reporting error
            NSLog(@"error reporting score");
        }
    }];
Run Code Online (Sandbox Code Playgroud)

此外,似乎在沙箱中,除非两个或更多不同的GameCenter帐户提交了分数,否则不会显示任何分数.