Rank of the local authenticated player for all time in the ranking of the gaming center leaders

I want to get the Rank of my local players for all time the best section in the leaderboard of the game center. I just found the code to get the local uploaded score. How to get your rating on the leaderboard.

thank

+3
source share
1 answer

Try using

GKScore* score = [leaderBoard localPlayerScore];
NSInteger rank = score.rank;

You should get the best points by calling:

[leaderBoard loadScoresWithCompletionHandler:^(NSArray* topScores, NSError* error){
     if (!error) {
        // topScores
     }
}];
+1
source

All Articles