Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/110.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 我能';无法打开GK身份验证对话框_Iphone_Ios_Authentication_Game Center_Gamekit - Fatal编程技术网

Iphone 我能';无法打开GK身份验证对话框

Iphone 我能';无法打开GK身份验证对话框,iphone,ios,authentication,game-center,gamekit,Iphone,Ios,Authentication,Game Center,Gamekit,我现在真的在和游戏中心斗争。这可能是因为GK作为一个整体一整天都在大便(letterpress刚刚发布!),但我无法获得一个auth对话框: - (void) authenticateLocalPlayer { GKLocalPlayer *localPlayer = [GKLocalPlayer localPlayer]; localPlayer.authenticateHandler = ^(UIViewController *viewController, NSError

我现在真的在和游戏中心斗争。这可能是因为GK作为一个整体一整天都在大便(letterpress刚刚发布!),但我无法获得一个auth对话框:

- (void) authenticateLocalPlayer
{
    GKLocalPlayer *localPlayer = [GKLocalPlayer localPlayer];
    localPlayer.authenticateHandler = ^(UIViewController *viewController, NSError *error)      {
    if (viewController) {
        NSLog(@"Foo 1");
        [self presentViewController:viewController animated:YES completion:nil];
    } else if (localPlayer.isAuthenticated) {
        NSLog(@"Foo 2");
    } else {
        NSLog(@"Foo 3");
    }
};
}
此方法连接到一个按钮。当我按下它时,我会在控制台中看到:

<Info>: 23:41:52.226407 com.apple.AVConference: GKSConnSettings: set server: {
    "gk-cdx" = "17.173.254.218:4398";
    "gk-commnat-cohort" = "17.173.254.220:16386";
    "gk-commnat-main0" = "17.173.254.219:16384";
    "gk-commnat-main1" = "17.173.254.219:16385";
}
:23:41:52.226407 com.apple.AVConference:GKSConnSettings:set服务器:{
“gk cdx”=“17.173.254.218:4398”;
“gk commnat队列”=“17.173.254.220:16386”;
“gk-commnat-main0”=“17.173.254.219:16384”;
“gk-commnat-main1”=“17.173.254.219:16385”;
}
只有第三个选项被打印出来:foo3。我快发疯了。发生了什么事?

Doh

我忘了在我的设备上进行临时测试时,我已经关掉了包标识符


您需要使用ITC中指定的捆绑包标识符。

即使捆绑包ID正确并且您确信iTunes Connect上的应用程序信息一切正常,您也可能会看到这种情况的另一个原因可能是您登录到了真实的GameCenter帐户,而不是沙盒帐户。如果是这样,请单击您的电子邮件并选择“注销”退出GameCenter,然后登录到您的一个测试帐户(在iTunes Connect的“管理用户”部分中设置)。您必须接受GameCenter沙盒服务条款(这些条款对我来说花了一点时间才出现,所以请耐心等待)。一旦您这样做并使用沙箱帐户登录,GameCenter对话框应该开始显示