沙盒游戏中心回合事件通知不一致 [英] Sandbox Game Center Turn Event Notifications Not Consistent

查看:11
本文介绍了沙盒游戏中心回合事件通知不一致的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Game Center 的回合制游戏功能制作回合制游戏.我正在使用模拟器和我的 iPhone 来测试转弯事件的通知.结果非常不一致.大约 75% 的时间,当我在模拟器上移动并通过转弯时,我的 iPhone 上没有收到任何通知.似乎没有调用此函数:

I'm making a turn-based game, using the Game Center Turn-Based Gaming functionality. I'm using the simulator and my iPhone to test notifications of turn events. The results are very inconsistent. About 75% of the time when I make a move on the simulator and pass the turn I don't get any notifications on my iPhone. It seems that this function doesn't get called:

handleTurnEventForMatch:didBecomeActive:

我在验证本地用户的代码中设置了 GKEventHandlerDelegate,它似乎设置正确.我偶尔收到通知的事实表明这不是问题所在.

I set the GKEventHandlerDelegate in the code that authenticates the local user and it seems to be set correctly. The fact that I get notifications once in a while suggests that this isn't where the problem lies.

有谁知道这可能是什么问题?这可能是沙盒游戏中心服务器的问题吗?它们是否会限制您可以在短时间内发送的通知数量或类似情况?

Does anyone have any idea what could be the problem here? Could this be a problem with the Sandbox Game Center Server? Do they limit the amount of notifications you can send in a short amount of time or something like that?

我刚刚发现一些人的帖子遇到了同样的问题,但没有解决方案.虽然没有最近的帖子.任何更新?

I just found some posts of people experiencing the same problem, but no solution. No very recent posts though. Any updates?

Edit2:我还发现,在移动之后,当我在另一台设备上打开 GKTurnBasedMatchmakerViewController 时,它仍然说轮到其他玩家了.当我关闭并重新打开它时,信息是正确的.此外,当我打开游戏 GKTurnBasedMatchmakerViewController 时它仍然显示不正确的信息时,它确实为我提供了带有更新信息的正确匹配对象.这有什么关系吗?

I also find that after a move, when I open the GKTurnBasedMatchmakerViewController on the other device it still says that it's the turn of the other player. When I close and reopen it the information is correct. Also, when I open the game GKTurnBasedMatchmakerViewController when it's still showing incorrect information, it does gives me the correct match object with the updated information. Could this be related in any way?

推荐答案

我想我会与您分享我的解决方案,希望您遇到同样的问题.从我对您问题的评论中可以看出,我遇到了和您一样的问题.事实证明,我在 iTunes Connect 中的设置是罪魁祸首,我不知道.您应该检查的是,您仍然在 iTunes Connect 需要的两个地方都启用了 Game Center.首先,进入 iTunes Connect 中的管理我的应用程序"后,选择您的应用程序并在右侧菜单中,然后单击管理游戏中心".确保当前已启用.我什至建议禁用它,然后再重新启用它.

I thought I would share my solution with you, in the hopes that it is the same problem you are experiencing. As you can see from my comment to your question, I was having the same issue as you. It turned out that my settings in iTunes Connect were the culprit, unbeknownst to me. What you should check for is that you still have Game Center enabled in BOTH places that iTunes Connect requires. First, after going into "Manage my Apps" in iTunes Connect, select your app and on the right menu, and click "Manage Game Center". Make sure this is currently enabled. I would even recommend disabling it, and re-enabling it again for good measure.

此外(这是我所缺少的),您必须在另一个地方启用它.首次选择应用程序时返回上一个屏幕.右上角是您可以选择管理游戏中心的地方,但我们正在查看版本"部分的底部.单击应用程序的查看详细信息按钮,并确保在底部附近启用了游戏中心按钮.同样,我也会在此处禁用并重新启用它.给它大约 10 分钟,从 Game Center 应用程序中清除所有开放回合和比赛(这可能是一个可选步骤),然后构建 &再次运行.希望您能再次正确收到转弯通知.

In addition (and this is what I was missing), you must enable it in one more place. Go back to the previous screen when you first select the app. The top right is where you can select Manage Game Center, but we are looking on the bottom in the "Versions" section. Click the View Details button for your app, and make sure the Game Center button is enabled near the bottom. Again, I would disable and re-enable it here as well. Give it about 10 minutes, clear all your open turns and matches from the Game Center app (this might be an optional step), and build & run again. Hopefully, you will receive turn notifications properly again.

这篇关于沙盒游戏中心回合事件通知不一致的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆