I'm implementing GameCenter for my game. I followed tutorials and created my ids for leaderboards and achievements.
Authenticating and achievements are working well. But GameCenter does not show scores for my levels.
I'm using the code below for sending score to GameCenter servers. Sending operation always returns success. But score not showing up.
GKScore *scoreReporter = [[GKScore alloc] initWithLeaderboardIdentifier: identifier];
scoreReporter.value = score;
scoreReporter.context = 0;
[GKScore reportScores:@[scoreReporter] withCompletionHandler:^(NSError *error) {
if (error == nil) {
NSLog(@"Score reported successfully!");
} else {
NSLog(@"Unable to report score!");
}
}];
I've read some of the other threads and they are not consistent enough. My ids right and the code is working well. With iOS 9 sandbox option is not available. So selecting sandbox from device's settings is not the issue.
Some of the reasons I can think of from my research why it is not working are these;
- Scores will take time to sync (It has been 5 hours since my first try)
- Small scores might not be sent to server sometimes (this is a very silly bug if this is happening but it was mentioned in the other threads)
- Some kind of problem with testing (It's not the issue I think because achievements is working)
Any help will be appreciated.