iTunes 连接启用游戏中心
我尝试在 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 选项。我想我需要首先将应用程序添加到“管理应用程序”,然后启用游戏中心选项。但如何添加仅用于测试的应用程序呢?
感谢您的帮助:)
I try to test Game Center in my iPhone game, but when I try to connect with the following lines of code I get an alert that says "This game is not recognized by 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.
}
}];
Now I've read many forums and looked at the Apple documentation, but I can't find how I can enable the Game Center option at iTunes connect. I think I need to first add an application to "Manage application" and then enable the Game Center option. But how can I add an application only for testing?
Thanks for any help :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为问题出在错误的cocos2d版本上。迁移到 v0.99.5 后游戏中心开始工作。
I think the problem was in wrong cocos2d version. After moving to v0.99.5 game center started working.
我正在使用 iPad 模拟器测试 iPad 应用程序。我也有类似的问题。
我已按照“Game Kit 编程指南”中指定的所有步骤进行操作,包括设置 iTunes Connect。即便如此,我仍然收到错误消息:游戏中心无法识别该游戏”
只有当我按照 iMuller 的建议将其从模拟器中删除并重新安装时,我的应用程序才被识别。
I am testing an iPad app with the iPad simulator. I was having a similar problem.
I had followed all the steps as specified in the "Game Kit Programming Guide", including setting up iTunes Connect. Even so I was still getting the error message: This game is not recognized by game center"
My app was only recognized when I deleted it from the simulator and re-installed it, as suggested by iMuller.