informHandler 从未被调用过
我正在使用游戏工具包将在线两名玩家添加到游戏中。我的测试设备是运行 4.3.5 的第三代 iPod touch 和运行 4.2.1 的第二代 iPod touch。两台设备上的 Game Center 通知均已打开。我没有使用 iPhone 模拟器。两台设备均使用单独的帐户登录 Game Center Sandbox。这些帐户已经是朋友了。
我可以成功验证 localPlayer
并发起邀请,但受邀设备永远不会收到邀请,并且受邀游戏的 inviteHandler
永远不会被调用。 inviteHandler
在验证 localPlayer
后立即设置。我已经浏览了游戏套件编程指南并实现了 GKMatchmakerViewControllerDelegate 协议中的所有方法,但我被难住了。
I'm adding online two player to a game using Game Kit. My test devices are a 3rd gen iPod touch running 4.3.5 and a 2nd gen iPod touch running 4.2.1. Game Center notifications are turned on on both devices. I am not using the iPhone Simulator. Both devices are logged into the Game Center Sandbox with separate accounts. The accounts are already friends.
I can successfully authenticate the localPlayer
and initiate an invite but the invited device never receives the invitation and the invited game's inviteHandler
is never called. The inviteHandler
is set immediately after authenticating the localPlayer
. I've scoured the Game Kit Programming Guide and implemented all methods in the GKMatchmakerViewControllerDelegate
protocol but I'm stumped.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明,当我最初创建这些沙盒帐户时,我关闭了“允许游戏邀请”。在 Game Center.app 的 Sandbox/Me 选项卡上,点击黄色帐户横幅,然后点击查看帐户。刚刚在第三台设备上创建新的沙盒帐户时才发现这一点。我可以得到一个德普吗?
Turns out that back when I originally created these Sandbox accounts I turned off "Allow Game Invites". In Game Center.app on the Sandbox/Me tab tap the yellow Account banner and then View Account. Only discovered this when creating a new Sandbox account on a third device just now. Can I get a derp?