沙箱排行榜为空
|
我正在尝试为我的应用制作Game Center排行榜。我一直在遵循Apple的步骤并遵循GKTapper的示例代码,但是我无法在Game Center中显示任何分数。我已经在iTunes Connect中设置了排行榜。这是报告分数的代码:
- (void) reportScore: (int64_t) score forCategory: (NSString *) category {
GKScore *scoreReporter = [[[GKScore alloc] initWithCategory:category] autorelease];
scoreReporter.value = score;
[scoreReporter reportScoreWithCompletionHandler:^(NSError *error) {
if (error != nil)
{
UIAlertView* alert= [[[UIAlertView alloc] initWithTitle: @\"Score Report Failed!\" message: [NSString stringWithFormat: @\"Reason: %@\", [error localizedDescription]] delegate: self cancelButtonTitle: @\"Try Again...\" otherButtonTitles: NULL] autorelease];
[alert show];
}
}];
}
该代码似乎运行良好。该警报从不显示。但是,当我进入Game Center时,排行榜是空白的。我正在运行Xcode 4.2和iOS5。有什么想法吗?
没有找到相关结果
已邀请:
5 个回复
骨酚柯
皇小福另届
为了显示正确的排行榜,我也在其中设置了类别。
荒劫娇噬
究补闯
董碘奴星