有人对 GameKit GKErrorDomain Code 3 有任何经验吗?当我尝试将分数上传到沙盒中的排行榜时收到错误消息。iOS 参考库只是说Indicates that an error occurred when communicating with Game Centre
The Here is the full error message:
Error Domain=GKErrorDomain Code=3 "The requested operation could not be completed due to an error communicating with the server." UserInfo=0x75e4eb0 {NSUnderlyingError=0x7531e00 "The operation couldn’t be completed. status = 5053", NSLocalizedDescription=The requested operation could not be completed due to an error communicating with the server
环境:
- 该请求是从 4.1 模拟器发出的
- GameKit 已对登录沙盒的本地玩家进行身份验证
- 名称为“标准”的排行榜已在 iTunes 连接上创建
- 我可以在模拟器中浏览网页
这是我用来上传分数的代码
GKScore *scoreReporter = [[[GKScore alloc] initWithCategory:@"Standard"] autorelease];
scoreReporter.value = 10;
[scoreReporter reportScoreWithCompletionHandler:^(NSError *error)
{
if (error != nil)
{
// handle the reporting error
NSLog(@"An error occured reporting the score");
}
else
{
NSLog(@"The score was reported successfully");
}
}];