GameKit · IOS API REFERENCE
GKLeaderboard
class · iOS 4.1+ · SDK 27.1
class GKLeaderboard
Members (35)
static · iOS 6.0+ · Deprecated in iOS 14.0loadLeaderboards
TypeScriptstatic loadLeaderboardsCompletionHandler(completionHandler?: (((arg0: (Array<GKLeaderboard>) | null, arg1: (NativeError) | null) => void)) | null): void
Swift declarationclass func loadLeaderboards() async throws -> [GKLeaderboard]
static · iOS 14.0+loadLeaderboards
TypeScriptstatic loadLeaderboardsIDsCompletionHandler(leaderboardIDs: (Array<string>) | null, completionHandler: ((arg0: (Array<GKLeaderboard>) | null, arg1: (NativeError) | null) => void)): void
Swift declarationclass func loadLeaderboards(IDs leaderboardIDs: [String]?) async throws -> [GKLeaderboard]
static · iOS 14.0+submitScore
TypeScriptstatic submitScoreContextPlayerLeaderboardIDsCompletionHandler(score: number, context: number, player: GKPlayer, leaderboardIDs: Array<string>, completionHandler: ((arg0: (NativeError) | null) => void)): void
Swift declarationclass func submitScore(_ score: Int, context: Int, player: GKPlayer, leaderboardIDs: [String]) async throws
init · iOS 4.1+ · Deprecated in iOS 8.0init
TypeScriptstatic initPlayerIDs(playerIDs?: (Array<string>) | null): (GKLeaderboard) | null
Swift declarationinit?(playerIDs: [String]?)
init · iOS 8.0+ · Deprecated in iOS 14.0init
TypeScriptstatic initPlayers(players: Array<GKPlayer>): GKLeaderboard
Swift declarationinit(players: [GKPlayer])
method · iOS 14.0+loadEntries
TypeScriptloadEntriesForTimeScopeRangeCompletionHandler(playerScope: GKLeaderboard_PlayerScope, timeScope: GKLeaderboard_TimeScope, range: SDKHandle, completionHandler: ((arg0: (GKLeaderboard_Entry) | null, arg1: (Array<GKLeaderboard_Entry>) | null, arg2: number, arg3: (NativeError) | null) => void)): void
Swift declarationfunc loadEntries(for playerScope: GKLeaderboard.PlayerScope, timeScope: GKLeaderboard.TimeScope, range: NSRange) async throws -> (GKLeaderboard.Entry?, [GKLeaderboard.Entry], Int)
method · iOS 14.0+loadEntries
TypeScriptloadEntriesForTimeScopeCompletionHandler(players: Array<GKPlayer>, timeScope: GKLeaderboard_TimeScope, completionHandler: ((arg0: (GKLeaderboard_Entry) | null, arg1: (Array<GKLeaderboard_Entry>) | null, arg2: (NativeError) | null) => void)): void
Swift declarationfunc loadEntries(for players: [GKPlayer], timeScope: GKLeaderboard.TimeScope) async throws -> (GKLeaderboard.Entry?, [GKLeaderboard.Entry])
method · iOS 7.0+loadImage
TypeScriptloadImage(completionHandler?: (((arg0: (_UIKit_UIImage) | null, arg1: (NativeError) | null) => void)) | null): void
Swift declarationfunc loadImage() async throws -> UIImage
method · iOS 14.0+loadPreviousOccurrence
TypeScriptloadPreviousOccurrence(completionHandler: ((arg0: (GKLeaderboard) | null, arg1: (NativeError) | null) => void)): void
Swift declarationfunc loadPreviousOccurrence() async throws -> GKLeaderboard?
method · iOS 4.0+ · Deprecated in iOS 14.0loadScores
TypeScriptloadScores(completionHandler?: (((arg0: (Array<GKScore>) | null, arg1: (NativeError) | null) => void)) | null): void
Swift declarationfunc loadScores(completionHandler: (([GKScore]?, (any Error)?) -> Void)? = nil)
method · iOS 14.0+submitScore
TypeScriptsubmitScoreContextPlayerCompletionHandler(score: number, context: number, player: GKPlayer, completionHandler: ((arg0: (NativeError) | null) => void)): void
Swift declarationfunc submitScore(_ score: Int, context: Int, player: GKPlayer) async throws
get · iOS 26.0+activityIdentifier
TypeScriptget activityIdentifier(): string
Swift declarationvar activityIdentifier: String { get }
get · iOS 26.0+activityProperties
TypeScriptget activityProperties(): Record<string, string>
Swift declarationvar activityProperties: [String : String] { get }
get · iOS 14.0+baseLeaderboardID
TypeScriptget baseLeaderboardID(): string
Swift declarationvar baseLeaderboardID: String { get }
get · iOS 14.0+duration
TypeScriptget duration(): number
Swift declarationvar duration: TimeInterval { get }
get · iOS 6.0+groupIdentifier
TypeScriptget groupIdentifier(): (string) | null
Swift declarationvar groupIdentifier: String? { get }
get · iOS 7.0+ · Deprecated in iOS 14.0identifier
TypeScriptget identifier(): (string) | null
Swift declarationvar identifier: String? { get set }
set · iOS 7.0+ · Deprecated in iOS 14.0identifier
TypeScriptset identifier(value: (string) | null)
Swift declarationvar identifier: String? { get set }
get · iOS 26.0+isHidden
TypeScriptget isHidden(): boolean
Swift declarationvar isHidden: Bool { get }
get · iOS 26.0+leaderboardDescription
TypeScriptget leaderboardDescription(): string
Swift declarationvar leaderboardDescription: String { get }
get · iOS 4.1+ · Deprecated in iOS 14.0isLoading
TypeScriptget isLoading(): boolean
Swift declarationvar isLoading: Bool { get }
get · iOS 4.0+ · Deprecated in iOS 14.0localPlayerScore
TypeScriptget localPlayerScore(): (GKScore) | null
Swift declarationvar localPlayerScore: GKScore? { get }
get · iOS 4.0+ · Deprecated in iOS 14.0maxRange
TypeScriptget maxRange(): number
Swift declarationvar maxRange: Int { get }
get · iOS 14.0+nextStartDate
TypeScriptget nextStartDate(): (globalThis.Date) | null
Swift declarationvar nextStartDate: Date? { get }
get · iOS 4.0+ · Deprecated in iOS 14.0playerScope
TypeScriptget playerScope(): GKLeaderboard_PlayerScope
Swift declarationvar playerScope: GKLeaderboard.PlayerScope { get set }
set · iOS 4.0+ · Deprecated in iOS 14.0playerScope
TypeScriptset playerScope(value: GKLeaderboard_PlayerScope)
Swift declarationvar playerScope: GKLeaderboard.PlayerScope { get set }
get · iOS 4.0+ · Deprecated in iOS 14.0range
TypeScriptget range(): SDKHandle
Swift declarationvar range: NSRange { get set }
set · iOS 4.0+ · Deprecated in iOS 14.0range
TypeScriptset range(value: SDKHandle)
Swift declarationvar range: NSRange { get set }
get · iOS 26.0+releaseState
TypeScriptget releaseState(): GKReleaseState
Swift declarationvar releaseState: GKReleaseState { get }
get · iOS 4.0+ · Deprecated in iOS 14.0scores
TypeScriptget scores(): (Array<GKScore>) | null
Swift declarationvar scores: [GKScore]? { get }
get · iOS 14.0+startDate
TypeScriptget startDate(): (globalThis.Date) | null
Swift declarationvar startDate: Date? { get }
get · iOS 4.0+ · Deprecated in iOS 14.0timeScope
TypeScriptget timeScope(): GKLeaderboard_TimeScope
Swift declarationvar timeScope: GKLeaderboard.TimeScope { get set }
set · iOS 4.0+ · Deprecated in iOS 14.0timeScope
TypeScriptset timeScope(value: GKLeaderboard_TimeScope)
Swift declarationvar timeScope: GKLeaderboard.TimeScope { get set }
get · iOS 4.1+title
TypeScriptget title(): (string) | null
Swift declarationvar title: String? { get }
get · iOS 14.0+type
TypeScriptget type(): GKLeaderboard_LeaderboardType
Swift declarationvar type: GKLeaderboard.LeaderboardType { get }
Skipped declarations
1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
GKLeaderboard.init()
inherited init: cannot prove legal (class declares 2 custom initializers)
All GameKit types →