GameKit · IOS API REFERENCE
GKScore
class · iOS 4.1+ · Deprecated in iOS 14.0 · SDK 27.1
class GKScore
Members (22)
static · iOS 14.0+ · Deprecated in iOS 26.0report
TypeScriptstatic reportWithEligibleChallengesWithCompletionHandler(scores: Array<GKLeaderboardScore>, challenges: Array<GKChallenge>, completionHandler?: (((arg0: (NativeError) | null) => void)) | null): void
Swift declarationclass func report(_ scores: [GKLeaderboardScore], withEligibleChallenges challenges: [GKChallenge]) async throws
static · iOS 6.0+ · Deprecated in iOS 14.0report
TypeScriptstatic reportWithCompletionHandler(scores: Array<GKScore>, completionHandler?: (((arg0: (NativeError) | null) => void)) | null): void
Swift declarationclass func report(_ scores: [GKScore]) async throws
static · iOS 6.0+ · Deprecated in iOS 14.0report
TypeScriptstatic reportWithEligibleChallengesWithCompletionHandler70774(scores: Array<GKScore>, challenges: Array<GKChallenge>, completionHandler?: (((arg0: (NativeError) | null) => void)) | null): void
Swift declarationclass func report(_ scores: [GKScore], withEligibleChallenges challenges: [GKChallenge]) async throws
method · iOS 17.0+ · Deprecated in iOS 26.0challengeComposeController
TypeScriptchallengeComposeControllerWithMessagePlayersCompletion(message?: (string) | null, players?: (Array<GKPlayer>) | null, completionHandler?: (((arg0: _UIKit_UIViewController, arg1: boolean, arg2: (Array<GKPlayer>) | null) => void)) | null): _UIKit_UIViewController
Swift declarationfunc challengeComposeController(withMessage message: String?, players: [GKPlayer]?, completion completionHandler: GKChallengeComposeHandler? = nil) -> UIViewController
method · iOS 8.0+ · Deprecated in iOS 17.0challengeComposeController
TypeScriptchallengeComposeControllerWithMessagePlayersCompletionHandler(message?: (string) | null, players?: (Array<GKPlayer>) | null, completionHandler?: (((arg0: _UIKit_UIViewController, arg1: boolean, arg2: (Array<string>) | null) => void)) | null): _UIKit_UIViewController
Swift declarationfunc challengeComposeController(withMessage message: String?, players: [GKPlayer]?, completionHandler: GKChallengeComposeCompletionBlock? = nil) -> UIViewController
method · iOS 7.0+ · Deprecated in iOS 8.0challengeComposeController
TypeScriptchallengeComposeControllerWithPlayersMessageCompletionHandler(playerIDs?: (Array<string>) | null, message?: (string) | null, completionHandler?: (((arg0: _UIKit_UIViewController, arg1: boolean, arg2: (Array<string>) | null) => void)) | null): (_UIKit_UIViewController) | null
Swift declarationfunc challengeComposeController(withPlayers playerIDs: [String]?, message: String?, completionHandler: GKChallengeComposeCompletionBlock? = nil) -> UIViewController?
init · iOS 4.1+ · Deprecated in iOS 14.0init
TypeScriptstatic initLeaderboardIdentifier(identifier: string): GKScore
Swift declarationinit(leaderboardIdentifier identifier: String)
init · iOS 7.0+ · Deprecated in iOS 8.0init
TypeScriptstatic initLeaderboardIdentifierForPlayer(identifier: string, playerID: string): (GKScore) | null
Swift declarationinit?(leaderboardIdentifier identifier: String, forPlayer playerID: String)
init · iOS 8.0+ · Deprecated in iOS 14.0init
TypeScriptstatic initLeaderboardIdentifierPlayer(identifier: string, player: GKPlayer): GKScore
Swift declarationinit(leaderboardIdentifier identifier: String, player: GKPlayer)
get · iOS 5.0+ · Deprecated in iOS 14.0context
TypeScriptget context(): number
Swift declarationvar context: UInt64 { get set }
set · iOS 5.0+ · Deprecated in iOS 14.0context
TypeScriptset context(value: number)
Swift declarationvar context: UInt64 { get set }
get · iOS 4.1+ · Deprecated in iOS 14.0date
TypeScriptget date(): globalThis.Date
Swift declarationvar date: Date { get }
get · iOS 4.1+ · Deprecated in iOS 14.0formattedValue
TypeScriptget formattedValue(): (string) | null
Swift declarationvar formattedValue: String? { get }
get · iOS 7.0+ · Deprecated in iOS 14.0leaderboardIdentifier
TypeScriptget leaderboardIdentifier(): string
Swift declarationvar leaderboardIdentifier: String { get set }
set · iOS 7.0+ · Deprecated in iOS 14.0leaderboardIdentifier
TypeScriptset leaderboardIdentifier(value: string)
Swift declarationvar leaderboardIdentifier: String { get set }
get · iOS 8.0+ · Deprecated in iOS 14.0player
TypeScriptget player(): GKPlayer
Swift declarationvar player: GKPlayer { get }
get · iOS 4.1+ · Deprecated in iOS 8.0playerID
TypeScriptget playerID(): (string) | null
Swift declarationvar playerID: String? { get }
get · iOS 4.1+ · Deprecated in iOS 14.0rank
TypeScriptget rank(): number
Swift declarationvar rank: Int { get }
get · iOS 5.0+ · Deprecated in iOS 14.0shouldSetDefaultLeaderboard
TypeScriptget shouldSetDefaultLeaderboard(): boolean
Swift declarationvar shouldSetDefaultLeaderboard: Bool { get set }
set · iOS 5.0+ · Deprecated in iOS 14.0shouldSetDefaultLeaderboard
TypeScriptset shouldSetDefaultLeaderboard(value: boolean)
Swift declarationvar shouldSetDefaultLeaderboard: Bool { get set }
get · iOS 4.1+ · Deprecated in iOS 14.0value
TypeScriptget value(): number
Swift declarationvar value: Int64 { get set }
set · iOS 4.1+ · Deprecated in iOS 14.0value
TypeScriptset value(value: number)
Swift declarationvar value: Int64 { get set }
Skipped declarations
1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
GKScore.init()
inherited init: cannot prove legal (class declares 3 custom initializers)
All GameKit types →