我正在为 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,但我不明白这是怎么回事!
当应用程序从游戏中心启动时我正确登录