-1

I want to give a feedback to a player who's on the top of the leaderboard.

i do it for daily leaderboard like this:

GKScore* gkScore = [self createScoreForeCategory:kLeaderboardCategoryCumulativePoints];

if (!self.gameCenterFeaturesEnabled || !self.achievements){

    return;
}

if(gkScore.rank == 1) {
   ... do my stuff
} 

Is it possible to get the rank of the player in the weekly leaderboard of iOS GameKit?

some kinde of:

if(gkScore.weeklyRank == 1) {
       ... do my stuff
} 
Sam
  • 2,707
  • 1
  • 23
  • 32

1 Answers1

0

I am not able to test this but you might be able to get what you through using GKLeaderboard...

After you load the leaderboard:

yourLeaderBoard.timeScope = GKLeaderboardTimeScopeWeek;
yourLeaderBoard leadScoresWithCompletionHandler:^(NSArray *scores, NSError *error){

}];
GKScore* gkScore = yourLeaderBoard.localPlayerScore;

(gkScore.rank == 1){
    //Do what you want to do
}

http://developer.apple.com/library/ios/#documentation/GameKit/Reference/GKLeaderboard_Ref/Reference/Reference.html

Alex Nagl
  • 157
  • 4