1

我尝试在我的 iPhone 游戏中测试 Game Center,但是当我尝试连接以下代码行时,我收到一条警报,提示“Game Center 无法识别此游戏。”。

[[GKLocalPlayer localPlayer] authenticateWithCompletionHandler:^(NSError *error) {
    if (error == nil)
    {
        // Insert code here to handle a successful authentication.
    }
    else
    {
        // Your application can process the error parameter to report the error to the player.
    }
}];

现在我已经阅读了许多论坛并查看了 Apple 文档,但我找不到如何在 iTunes Connect 上启用 Game Center 选项。我想我需要先将应用程序添加到“管理应用程序”,然后启用游戏中心选项。但是我怎样才能添加一个只用于测试的应用程序呢?

谢谢你的帮助 :)

4

2 回答 2

1

我认为问题出在错误的 cocos2d 版本中。迁移到 v0.99.5 后游戏中心开始工作。

于 2010-10-23T10:38:00.850 回答
0

我正在使用 iPad 模拟器测试 iPad 应用程序。我遇到了类似的问题。

我已按照“Game Kit Programming Guide”中指定的所有步骤进行操作,包括设置 iTunes Connect。即便如此,我仍然收到错误消息:游戏中心无法识别此游戏”

我的应用程序只有在我从模拟器中删除并重新安装时才被识别,正如 iMuller 所建议的那样。

于 2010-11-10T13:54:02.397 回答