【问题标题】:Not sending turn with GKTurnBasedParticipant IOS 5 iphone不使用 GKTurnBasedParticipant IOS 5 iphone 发送转弯
【发布时间】:2013-03-12 22:10:02
【问题描述】:

我正在开发一款带有 Game Center 功能的 iPad 和 iPhone 应用。游戏从 iPad 2 IOS 6 正确发送一个参与者转弯,但是当我尝试从 iPhone 4 IOS 5 将转弯发送给另一个参与者时,出现以下错误:

<GKTurnBasedParticipant 3d8e50 - id:(null) status:Matching outcome:None lastTurn:(null)>
2013-03-14 23:56:22.030 [453:707] ERROR::::::Error Domain=GKErrorDomain Code=3 "The requested operation could not be completed due to an error communicating with the server." UserInfo=0x7a81170 {NSUnderlyingError=0x3f4220 "The operation couldn’t be completed. status = 5008, missing required key: turns", NSLocalizedDescription=The requested operation could not be completed due to an error communicating with the server.}
2013-03-14 23:56:22.031 [453:707] Oops, there was a problem.  Try that again.

我正在使用以下在 IOS 6 上完美运行的方法:

[currentMatch endTurnWithNextParticipant:nextParticipant
                                       matchData:data completionHandler:^(NSError *error) {
                                           if (error) {
                                               NSLog(@"%@", error);
                                               NSLog(
                                               @"Oops, there was a problem.  Try that again.");
                                           } else {
                                               NSLog(@"Your turn is over.");

                                           }
                                       }];

错误号 3 是 GKErrorCommunicationsFailure,但我不明白这是怎么回事!

应用在游戏中心启动时我正确登录

【问题讨论】:

  • 您可以访问游戏中心应用程序吗?我在加载常规游戏中心应用程序以及其他应用程序时遇到问题。我不得不恢复出厂设置然后重新jb它。
  • 是的,我可以访问游戏中心应用程序。我也可以接收其他玩家的回合,但我不能发送回合
  • 这个问题已经消失,最终是服务器问题。

标签: ios5 game-center gkturnbasedmatch


【解决方案1】:

当你在模拟器而不是设备上工作时,这个错误总是会出现,但有时它会在设备上弹出,因为推送通知失败, 请检查您的设备是否正在接收推送通知。

更新

我最近发现 Game Center 不会向未插入 sim 卡的设备发送推送通知

【讨论】:

  • 当我使用带有 IOS 5.0.1 的 iphone 4 时出现此消息。我的设备没有收到游戏中心的推送通知,因为在不向其他玩家发送轮到的情况下继续游戏是不可能的
  • 请检查您的设备是否普遍收到PUSH通知,有时越狱设备故障收不到PUSH通知。
  • 我的设备正确接收推送通知。我的手机越狱了,我删除了越狱并重新启动它以防手机被禁止,但它仍然无法在游戏中心使用我正在开发的游戏发送轮流
  • @Aitul 你解决问题了吗?如果没有,请检查您的 iPhone 中是否插入了 SIM 卡,我最近发现 Game Center 不会向未插入 SIM 卡的设备发送推送通知。
猜你喜欢
  • 2012-11-10
  • 1970-01-01
  • 1970-01-01
  • 2013-06-10
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多