Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Game Center showLeaderboard

in Bugs Posts: 13

the new version 3.2 of Codea brings me to despair.
The call to "gamecenter_showLeaderboards" no longer works correctly. When the Game Center open the passed leaderboard is no longer displayed after calling the method. When you open the Game Center always appear first the standard leaderboard and not the passed one.
In the Codea version 2.1 everything worked.
How can I solve this problem?
Greetings schuju


  • SimeonSimeon Admin Mod
    edited March 2015 Posts: 5,626

    Oops, looks like a bug in the Game Center addon code.

    It's assigning the default leaderboard regardless of what you pass in. Fix below:

    Line 165 of GameCenterAddon.m

    - (void) showLeaderboardWithID:(NSString *)leaderboardID
        __weak __typeof(&*self)weakSelf = self;
        leaderboardID = leaderboardID ?: self.defaultLeaderboard;
        [self showGameCenterWithConfigurationBlock:^(GKGameCenterViewController *gvc) {
            gvc.viewState = GKGameCenterViewControllerStateLeaderboards;
            gvc.leaderboardIdentifier = leaderboardID; //<- FIX HERE

    EDIT: Bug is fixed in the Codea-Addons repo on Github

  • Posts: 13

    Thank you for the quick solution!

Sign In or Register to comment.