Note that there are some explanatory texts on larger screens.

plurals
  1. POGamer Center leaderboard shows no scores, and each user only has access to their own score
    primarykey
    data
    text
    <p>I'm trying to make a leaderboard in my game with Game Center. I post the high score like so:</p> <pre><code>GKScore *myScoreValue = [[[GKScore alloc] initWithCategory:@"grp.high_scores"] autorelease]; myScoreValue.value = self.game.scoreMeter.score; NSLog(@"Attemping to submit score: %@", myScoreValue); [myScoreValue reportScoreWithCompletionHandler:^(NSError *error){ if(error != nil){ NSLog(@"Score Submission Failed"); } else { NSLog(@"Score Submitted"); id appDelegate = [[UIApplication sharedApplication] delegate]; [appDelegate displayLeaderBoard:nil]; } }]; </code></pre> <p>I see "Score Submitted" as expecting, and it brings up the Game Center leaderboard view, but it just reads "No Scores"</p> <p>I know other people have said <a href="https://stackoverflow.com/questions/8720316/ios-game-center-scores-not-showing-on-leaderboard-in-sandbox">you need at least two accounts</a>, but I've tried with three already.</p> <p>For each account, the game shows up for them in the Game Center App, and when I query for the top ten scores:</p> <pre><code>- (void) retrieveTopTenScores { GKLeaderboard *leaderboardRequest = [[GKLeaderboard alloc] init]; if (leaderboardRequest != nil) { leaderboardRequest.playerScope = GKLeaderboardPlayerScopeGlobal; leaderboardRequest.timeScope = GKLeaderboardTimeScopeAllTime; leaderboardRequest.range = NSMakeRange(1,10); [leaderboardRequest loadScoresWithCompletionHandler: ^(NSArray *scores, NSError *error) { if (error != nil) { NSLog(@"Error grabbing top ten: %@", error); } if (scores != nil) { NSLog(@"Top ten scores: %@", scores); } }]; } } </code></pre> <p>each user only sees their own score.</p> <p>So why is the leaderboard empty, and why is each user only seeing their own score?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload