我试图通过这个代码块展示排行榜
if ([GKLocalPlayer localPlayer].isAuthenticated) {
GKGameCenterViewController *gameCenterController = [[GKGameCenterViewController alloc] init];
if (gameCenterController != nil)
{
gameCenterController.gameCenterDelegate = self;
gameCenterController.viewState = GKGameCenterViewControllerStateLeaderboards;
UIViewController *vc = self.view.window.rootViewController;
[vc presentViewController: gameCenterController animated:YES completion:Nil];
}
}else{
UIAlertView *message = [[UIAlertView alloc] initWithTitle:@"You must enable Game Center"
message:@"Sign in through the Game Center app to enable all features"
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[message show];
}
如果我启用了所有异常断点,它会在排行榜出现的那一刻崩溃。当我删除这个断点时,一切正常。我正在使用测试用户登录游戏中心。这是一个小故障还是什么?