Ios GKGameCenterViewController出现在屏幕上几秒钟后意外被解除

Ios GKGameCenterViewController出现在屏幕上几秒钟后意外被解除,ios,objective-c,ios7,game-center,Ios,Objective C,Ios7,Game Center,我创建了一个与GameCenter集成的游戏-我使用排行榜跟踪用户的高分。在主菜单中,我允许用户使用GKGameCenterViewController类可视化排行榜,创建其实例并在屏幕上显示,从我的主ViewController调用以下方法: #pragma mark - Game Center Methods //This is called from ViewDidLoad - (void) authenticateLocalPlayer { GKLocalPlayer *loc

我创建了一个与GameCenter集成的游戏-我使用排行榜跟踪用户的高分。在主菜单中,我允许用户使用GKGameCenterViewController类可视化排行榜,创建其实例并在屏幕上显示,从我的主ViewController调用以下方法:

#pragma mark - Game Center Methods

//This is called from ViewDidLoad
- (void) authenticateLocalPlayer
{
    GKLocalPlayer *localPlayer = [GKLocalPlayer localPlayer];
    if (!localPlayer.isAuthenticated){
        localPlayer.authenticateHandler = ^(UIViewController *viewController, NSError *error){
            if (viewController != nil)
            {
                //showAuthenticationDialogWhenReasonable: is an example method name
                [self presentViewController:viewController animated:YES completion:nil];
            }
            else if ([GKLocalPlayer localPlayer].isAuthenticated){
                [[SettingAndScoreManager defaultManager]refreshHighScore];
            }
            else
            {
                UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:@"Game Center Unavailable" message:@"An error occured - please open the Game Center and sign in manually selecting the game from the apps available" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
                [alertView show];
            }
        };
    }
}

//This is called when the "Leaderboard" button is pressed in the main menu - please see video demo below
- (void)showGameCenter
{
    GKGameCenterViewController *gameCenterController = [[GKGameCenterViewController alloc] init];
if (gameCenterController != nil)
    {
       gameCenterController.gameCenterDelegate = self;
       [self presentViewController: gameCenterController animated: YES completion:nil];
    }
}

//delegate method to dismiss the GKGameCenterViewController
- (void)gameCenterViewControllerDidFinish:(GKGameCenterViewController *)gameCenterViewController
{
    [self dismissViewControllerAnimated:YES completion:nil];
}
使用的一切都正常工作-调用该方法时(仅当用户已在Game Center中通过身份验证时才允许),Game Center VC出现在显示排行榜的屏幕上。然而,三天来,当我试图调用该方法时,VC出现了,但保持为空几秒钟,然后它会自动退出,而无需按任何键

一开始我以为这是游戏中心的一个暂时问题,但现在已经三天了——我在三个不同的设备上试过了,我也遇到了同样的问题。但是,如果我直接打开Game Center应用程序并在可用游戏列表中搜索我的应用程序,我可以正确显示排行榜

你知道发生了什么事吗

这是我上传的演示,展示了这个问题

更新:我向苹果开发人员技术支持部门提出了一个问题,经过几次测试,他们没有找到答案,建议提交一份错误报告,我刚刚完成了这项工作。我将用结果更新问题

更新:Apple Bug Reporter上的问题ID是15955767


谢谢。

您能否在一个简单的演示应用程序中重现这个问题,并与大家分享,或者在要点中再添加一点代码?你分享的看起来很好,但它可能与某些项目设置或其他冲突代码有关。@M0rph3v5我刚刚用所有相关代码和一个视频演示更新了我的答案,演示了发生的情况。请发布雷达号码,以便人们可以复制。@LeoNatan-感谢您的评论,我已将其添加到我的答案中。1.)问题ID 15955767似乎不存在。那是正确的身份证吗???2.)此外,我可以确认您在YouTube上描述和显示的问题实际上也在我的应用程序(仅限iOS 7)上“间歇”发生。有时有效,有时无效。我使用的代码和你差不多。