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

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

问题描述

我正在制作一个回合制游戏,使用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需要的两个地方启用游戏中心。首先,在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天全站免登陆