私は iOS 6.0 向けに開発を行っており、Game Center にスコアを提出しています。インターネット接続でスコアを送信すると、すべて正常に動作します。
インターネット接続をオフにして、リーダーボードを更新する必要があるスコアを送信すると、エラーなしで完了ハンドラーが呼び出されます。インターネット接続を再びオンにすると、GameKit がスコアを Game Center に転送し、リーダーボードが更新されることを期待しています。しかし、しばらくしても(1時間以上)更新されません。
プレーヤーは、スコアが最初に送信されたときに認証され、インターネット接続が再度オンになったときに認証されます。
何か不足していますか?サンドボックス アカウントでも機能しますか? 私のスコア提出コードは以下のとおりです。
- (void)submitScore:(int64_t)score category:(NSString*)category {
//1: Check if Game Center features are enabled
if (!_gcEnabled) {
return;
}
//2: Create a GKScore object
GKScore* gkScore = [[GKScore alloc] initWithCategory:category];
//3: Set the score value
gkScore.value = score;
//4: Send the score to Game Center
[gkScore reportScoreWithCompletionHandler:^(NSError* error) {
[self setLastError:error];
BOOL success = (error == nil);
if ([_delegate respondsToSelector:@selector(onScoresSubmitted:)]) {
[_delegate onScoresSubmitted:success];
}
}];
}