Class GKLeaderboard

All Implemented Interfaces:
NSObjectProtocol, ObjCProtocol

public class GKLeaderboard
extends NSObject
  • Constructor Details

    • GKLeaderboard

      public GKLeaderboard()
    • GKLeaderboard

      protected GKLeaderboard​(NSObject.Handle h, long handle)
    • GKLeaderboard

      protected GKLeaderboard​(NSObject.SkipInit skipInit)
    • GKLeaderboard

      @Deprecated public GKLeaderboard​(List<String> playerIDs)
      Deprecated.
      Deprecated in iOS 8.0. Use initWithPlayers: instead
    • GKLeaderboard

      @Deprecated public GKLeaderboard​(NSArray<GKPlayer> players)
      Deprecated.
      Deprecated in iOS 14.0. Use instance method loadEntriesForPlayers:timeScope:completionHandler: instead.
  • Method Details

    • getTitle

      public String getTitle()
    • getGroupIdentifier

      public String getGroupIdentifier()
    • getBaseLeaderboardID

      public String getBaseLeaderboardID()
      Since:
      Available in iOS 14.0 and later.
    • getType

      public GKLeaderboardType getType()
      Since:
      Available in iOS 14.0 and later.
    • getStartDate

      public NSDate getStartDate()
      Since:
      Available in iOS 14.0 and later.
    • getNextStartDate

      public NSDate getNextStartDate()
      Since:
      Available in iOS 14.0 and later.
    • getDuration

      public double getDuration()
      Since:
      Available in iOS 14.0 and later.
    • getCategory

      @Deprecated public String getCategory()
      Deprecated.
      Deprecated in iOS 7.0. Use identifier instead
    • setCategory

      @Deprecated public void setCategory​(String v)
      Deprecated.
      Deprecated in iOS 7.0. Use identifier instead
    • getTimeScope

      @Deprecated public GKLeaderboardTimeScope getTimeScope()
      Deprecated.
      Deprecated in iOS 14.0. Use loadEntriesForPlayerScope:timeScope:range:completionHandler: instead.
    • setTimeScope

      @Deprecated public void setTimeScope​(GKLeaderboardTimeScope v)
      Deprecated.
      Deprecated in iOS 14.0. Use loadEntriesForPlayerScope:timeScope:range:completionHandler: instead.
    • getPlayerScope

      @Deprecated public GKLeaderboardPlayerScope getPlayerScope()
      Deprecated.
      Deprecated in iOS 14.0. Use loadEntriesForPlayerScope:timeScope:range:completionHandler: instead.
    • setPlayerScope

      @Deprecated public void setPlayerScope​(GKLeaderboardPlayerScope v)
      Deprecated.
      Deprecated in iOS 14.0. Use loadEntriesForPlayerScope:timeScope:range:completionHandler: instead.
    • getIdentifier

      @Deprecated public String getIdentifier()
      Deprecated.
      Deprecated in iOS 14.0. Use loadEntriesForPlayerScope:timeScope:range:completionHandler: instead.
    • setIdentifier

      @Deprecated public void setIdentifier​(String v)
      Deprecated.
      Deprecated in iOS 14.0. Use loadEntriesForPlayerScope:timeScope:range:completionHandler: instead.
    • getRange

      @Deprecated public NSRange getRange()
      Deprecated.
      Deprecated in iOS 14.0. Use loadEntriesForPlayerScope:timeScope:range:completionHandler: instead.
    • setRange

      @Deprecated public void setRange​(NSRange v)
      Deprecated.
      Deprecated in iOS 14.0. Use loadEntriesForPlayerScope:timeScope:range:completionHandler: instead.
    • getScores

      @Deprecated public NSArray<GKScore> getScores()
      Deprecated.
      Deprecated in iOS 14.0. Use loadEntriesForPlayerScope:timeScope:range:completionHandler: to obtain scores.
    • getMaxRange

      @Deprecated public long getMaxRange()
      Deprecated.
      Deprecated in iOS 14.0. Use loadEntriesForPlayerScope:timeScope:range:completionHandler: method to obtain the size of the leaderboard.
    • getLocalPlayerScore

      @Deprecated public GKScore getLocalPlayerScore()
      Deprecated.
      Deprecated in iOS 14.0. Use loadEntriesForPlayerScope:timeScope:range:completionHandler: method to obtain scores.
    • isLoading

      @Deprecated public boolean isLoading()
      Deprecated.
      Deprecated in iOS 14.0. Use loadEntriesForPlayerScope:timeScope:range:completionHandler: method to obtain scores.
    • loadPreviousOccurrence

      public void loadPreviousOccurrence​(VoidBlock2<GKLeaderboard,​NSError> completionHandler)
      Since:
      Available in iOS 14.0 and later.
    • submitScore

      public void submitScore​(long score, long context, GKPlayer player, VoidBlock1<NSError> completionHandler)
      Since:
      Available in iOS 14.0 and later.
    • loadEntriesForPlayerScope

      public void loadEntriesForPlayerScope​(GKLeaderboardPlayerScope playerScope, GKLeaderboardTimeScope timeScope, NSRange range, VoidBlock4<GKLeaderboardEntry,​NSArray<GKLeaderboardEntry>,​Long,​NSError> completionHandler)
      Since:
      Available in iOS 14.0 and later.
    • loadEntriesForPlayers

      public void loadEntriesForPlayers​(NSArray<GKPlayer> players, GKLeaderboardTimeScope timeScope, VoidBlock3<GKLeaderboardEntry,​NSArray<GKLeaderboardEntry>,​NSError> completionHandler)
      Since:
      Available in iOS 14.0 and later.
    • loadLeaderboards

      public static void loadLeaderboards​(NSArray<NSString> leaderboardIDs, VoidBlock2<NSArray<GKLeaderboard>,​NSError> completionHandler)
      Since:
      Available in iOS 14.0 and later.
    • submitScore

      public static void submitScore​(long score, long context, GKPlayer player, NSArray<NSString> leaderboardIDs, VoidBlock1<NSError> completionHandler)
      Since:
      Available in iOS 14.0 and later.
    • init

      @Deprecated protected long init​(List<String> playerIDs)
      Deprecated.
      Deprecated in iOS 8.0. Use initWithPlayers: instead
    • init

      @Deprecated protected long init​(NSArray<GKPlayer> players)
      Deprecated.
      Deprecated in iOS 14.0. Use instance method loadEntriesForPlayers:timeScope:completionHandler: instead.
    • loadScores

      @Deprecated public void loadScores​(VoidBlock2<NSArray<GKScore>,​NSError> completionHandler)
      Deprecated.
      Deprecated in iOS 14.0. Use loadEntriesForPlayerScope:timeScope:range:completionHandler:.
    • setDefaultLeaderboard

      @Deprecated public static void setDefaultLeaderboard​(String leaderboardIdentifier, VoidBlock1<NSError> completionHandler)
      Deprecated.
      Deprecated in iOS 7.0. Use setDefaultLeaderboardIdentifier:completionHandler: on GKLocalPlayer instead
    • loadLeaderboards

      @Deprecated public static void loadLeaderboards​(VoidBlock2<NSArray<GKLeaderboard>,​NSError> completionHandler)
      Deprecated.
      Deprecated in iOS 14.0. Use class method loadLeaderboardsWithIDs:completionHandler:
    • loadImage

      public void loadImage​(VoidBlock2<UIImage,​NSError> completionHandler)