我正在使用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,但我无法理解它是怎么回事!
我在应用程序以游戏中心启动时正确登录
答案 0 :(得分:0)
当您使用模拟器而不是设备时,将始终出现此错误,但由于推送通知失败,有时它会在设备上弹出, 请检查您的设备是否正在接收推送通知。
<强>已更新强>
我最近发现游戏中心没有向没有插入SIM卡的设备发送推送通知