Hello,
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
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
Thank you for the quick solution!