ios5 - 不使用 GKTurnBasedParticipant IOS 5 iphone 发送回合

标签 ios5 game-center gkturnbasedmatch

我正在为 iPad 和 iPhone 开发具有 Game Center 功能的应用程序。游戏正确发送一个参与者从 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,但我不明白这是怎么回事!

当应用程序以游戏中心启动时,我正确登录

最佳答案

当你在模拟器而不是设备上工作时,这个错误总是会出现,但有时它会在设备上弹出,因为推送通知失败,
请检查您的设备是否正在接收推送通知。
更新
我最近发现 Game Center 不会向没有插入 SIM 卡的设备发送推送通知

关于ios5 - 不使用 GKTurnBasedParticipant IOS 5 iphone 发送回合,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15373204/

相关文章:

ios - 测试游戏中心成就

sandbox - 关于游戏中心(沙盒)的问题

ios - 游戏中心 "the specified participant does not have the required turn state"

ios - Game Center 新比赛邀请自动被邀请者立即拒绝

ios - 取消按钮出现但完成按钮未出现在 uitoolbar 中

ios - 通用应用程序 Splitviewcontroller

ios5 - 从Phonegap访问IOS中的通知中心

ios - Ios 谷歌地图完成滚动的委托(delegate)方法是什么?

ios - 更新到 Swift 2 后,Game Center 不接受我的代码

iOS 游戏中心——频繁出现连接中断消息