iosgame-centergamekitgame-center-leaderboardgkscore

Unable to see leaderboard tab in game center app


I have created new leaderboard (My first leaderboard) via following tutorial

GameCenter Leaderboard Implementation Tutorial

I had no error while initialisation nor reporting score. I had successfully submitted different scores from 5 to 10 different devices. The issue is i am unable to see Leaderboard tab in GameCenter app and new its 10 days since implementing leaderboard.

I had cross verified my implementation many times with other tutorial and developers. Please help me to resolve this issue.

Code to submit score :-

- (void) submitScore : (int)_score  {  

if (!_gameCenterFeaturesEnabled) {  
    NSLog(@"Player not authenticated");  
    return;  
}  

GKScore* gkScore = [[GKScore alloc] initWithLeaderboardIdentifier: GC_LEADERBOARD_ID];  
gkScore.value = _score;  

[GKScore reportScores: @[gkScore] withCompletionHandler: ^(NSError* error) {  

    NSLog(@"Error Reporting Score to Leaderboard %@", error);  
    NSLog(@"GKScore %@", gkScore);  

    if (error == nil) {  
        if ([_delegate respondsToSelector: @selector(onScoresSubmitted:)]) {  
            [_delegate onScoresSubmitted: YES];  
        }  
    }  
    else {  
        [self setLastError:error];  
    }  
 }];
}  

Code to show Leaderboard :-

-(void)showLeaderboard {  

GKGameCenterViewController *gcViewController = [[GKGameCenterViewController alloc] init];     
gcViewController.gameCenterDelegate = self;  
gcViewController.viewState = GKGameCenterViewControllerStateLeaderboards;  
gcViewController.leaderboardIdentifier = GC_LEADERBOARD_ID;  

[self presentViewController: gcViewController animated:YES forDisplay: self.view];  
}  

Solution

  • I found the solution. Just make sure that in iTunes Connect Game Center is enabled for your app. Also make sure the leaderboard you created is attached to the new version of your app (versus just creating a new leaderboard). These are easy steps to miss especially if we are new to iTunes Connect.