Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can we retrieve the player rank in a given leaderboard? #12

Open
piegaro opened this issue Feb 24, 2014 · 3 comments
Open

How can we retrieve the player rank in a given leaderboard? #12

piegaro opened this issue Feb 24, 2014 · 3 comments

Comments

@piegaro
Copy link

piegaro commented Feb 24, 2014

Hi

Thanks a lot for this lib. The call [[GameCenterManager sharedManager] highScoreForLeaderboard:@"LeaderboardID"] is very useful.

I am having a hard time trying to do the same thing but to retrieve the player rank (position in the leaderboard). Would it be easy for you to provide the highRankForLeaderboard method as well?

Thanks very much, have a nice day.

@Sam-Spencer
Copy link
Collaborator

Sure, sounds like a good idea! This will be implemented in a future version.

@SoundBlaster
Copy link

You can get rank inside -syncGameCenter in place where array GCMLeaderboards is processed. But there is need one improvement — current version of GCM works with ONE leaderboard for the game. It's awful...

@Sam-Spencer
Copy link
Collaborator

Hi @SoundBlaster, there are some major improvements coming to many aspects of GCManager (including leaderboard retrieval features). For now, you can use the GameKit block-based APIs to get leaderboards and the user's rank on each:

[GKAchievement loadScoresWithCompletionHandler:^(NSArray *scores, NSError *error) {
    for (GKScore *score in scores) {
        // Handle each score
    }
}];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants