GameKit GKErrorDomain Code 3 の経験はありますか? サンドボックスのリーダーボードにスコアをアップロードしようとすると、エラー メッセージが表示されます。iOS リファレンス ライブラリにIndicates that an error occurred when communicating with Game Centre
は、完全なエラー メッセージは次のとおりです。
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 は、サンドボックスにログインしたローカル プレイヤーを認証しました
- 「Standard」という名前のリーダーボードが iTunes Connect に作成されました
- シミュレーターで Web を閲覧できます
スコアをアップロードするために使用するコードは次のとおりです
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");
}
}];