One Logo Pool Ball
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.0

report

TypeScript
static reportWithEligibleChallengesWithCompletionHandler(scores: Array<GKLeaderboardScore>, challenges: Array<GKChallenge>, completionHandler?: (((arg0: (NativeError) | null) => void)) | null): void
Swift declaration
class func report(_ scores: [GKLeaderboardScore], withEligibleChallenges challenges: [GKChallenge]) async throws
static · iOS 6.0+ · Deprecated in iOS 14.0

report

TypeScript
static reportWithCompletionHandler(scores: Array<GKScore>, completionHandler?: (((arg0: (NativeError) | null) => void)) | null): void
Swift declaration
class func report(_ scores: [GKScore]) async throws
static · iOS 6.0+ · Deprecated in iOS 14.0

report

TypeScript
static reportWithEligibleChallengesWithCompletionHandler70774(scores: Array<GKScore>, challenges: Array<GKChallenge>, completionHandler?: (((arg0: (NativeError) | null) => void)) | null): void
Swift declaration
class func report(_ scores: [GKScore], withEligibleChallenges challenges: [GKChallenge]) async throws
method · iOS 17.0+ · Deprecated in iOS 26.0

challengeComposeController

TypeScript
challengeComposeControllerWithMessagePlayersCompletion(message?: (string) | null, players?: (Array<GKPlayer>) | null, completionHandler?: (((arg0: _UIKit_UIViewController, arg1: boolean, arg2: (Array<GKPlayer>) | null) => void)) | null): _UIKit_UIViewController
Swift declaration
func challengeComposeController(withMessage message: String?, players: [GKPlayer]?, completion completionHandler: GKChallengeComposeHandler? = nil) -> UIViewController
method · iOS 8.0+ · Deprecated in iOS 17.0

challengeComposeController

TypeScript
challengeComposeControllerWithMessagePlayersCompletionHandler(message?: (string) | null, players?: (Array<GKPlayer>) | null, completionHandler?: (((arg0: _UIKit_UIViewController, arg1: boolean, arg2: (Array<string>) | null) => void)) | null): _UIKit_UIViewController
Swift declaration
func challengeComposeController(withMessage message: String?, players: [GKPlayer]?, completionHandler: GKChallengeComposeCompletionBlock? = nil) -> UIViewController
method · iOS 7.0+ · Deprecated in iOS 8.0

challengeComposeController

TypeScript
challengeComposeControllerWithPlayersMessageCompletionHandler(playerIDs?: (Array<string>) | null, message?: (string) | null, completionHandler?: (((arg0: _UIKit_UIViewController, arg1: boolean, arg2: (Array<string>) | null) => void)) | null): (_UIKit_UIViewController) | null
Swift declaration
func challengeComposeController(withPlayers playerIDs: [String]?, message: String?, completionHandler: GKChallengeComposeCompletionBlock? = nil) -> UIViewController?
init · iOS 4.1+ · Deprecated in iOS 14.0

init

TypeScript
static initLeaderboardIdentifier(identifier: string): GKScore
Swift declaration
init(leaderboardIdentifier identifier: String)
init · iOS 7.0+ · Deprecated in iOS 8.0

init

TypeScript
static initLeaderboardIdentifierForPlayer(identifier: string, playerID: string): (GKScore) | null
Swift declaration
init?(leaderboardIdentifier identifier: String, forPlayer playerID: String)
init · iOS 8.0+ · Deprecated in iOS 14.0

init

TypeScript
static initLeaderboardIdentifierPlayer(identifier: string, player: GKPlayer): GKScore
Swift declaration
init(leaderboardIdentifier identifier: String, player: GKPlayer)
get · iOS 5.0+ · Deprecated in iOS 14.0

context

TypeScript
get context(): number
Swift declaration
var context: UInt64 { get set }
set · iOS 5.0+ · Deprecated in iOS 14.0

context

TypeScript
set context(value: number)
Swift declaration
var context: UInt64 { get set }
get · iOS 4.1+ · Deprecated in iOS 14.0

date

TypeScript
get date(): globalThis.Date
Swift declaration
var date: Date { get }
get · iOS 4.1+ · Deprecated in iOS 14.0

formattedValue

TypeScript
get formattedValue(): (string) | null
Swift declaration
var formattedValue: String? { get }
get · iOS 7.0+ · Deprecated in iOS 14.0

leaderboardIdentifier

TypeScript
get leaderboardIdentifier(): string
Swift declaration
var leaderboardIdentifier: String { get set }
set · iOS 7.0+ · Deprecated in iOS 14.0

leaderboardIdentifier

TypeScript
set leaderboardIdentifier(value: string)
Swift declaration
var leaderboardIdentifier: String { get set }
get · iOS 8.0+ · Deprecated in iOS 14.0

player

TypeScript
get player(): GKPlayer
Swift declaration
var player: GKPlayer { get }
get · iOS 4.1+ · Deprecated in iOS 8.0

playerID

TypeScript
get playerID(): (string) | null
Swift declaration
var playerID: String? { get }
get · iOS 4.1+ · Deprecated in iOS 14.0

rank

TypeScript
get rank(): number
Swift declaration
var rank: Int { get }
get · iOS 5.0+ · Deprecated in iOS 14.0

shouldSetDefaultLeaderboard

TypeScript
get shouldSetDefaultLeaderboard(): boolean
Swift declaration
var shouldSetDefaultLeaderboard: Bool { get set }
set · iOS 5.0+ · Deprecated in iOS 14.0

shouldSetDefaultLeaderboard

TypeScript
set shouldSetDefaultLeaderboard(value: boolean)
Swift declaration
var shouldSetDefaultLeaderboard: Bool { get set }
get · iOS 4.1+ · Deprecated in iOS 14.0

value

TypeScript
get value(): number
Swift declaration
var value: Int64 { get set }
set · iOS 4.1+ · Deprecated in iOS 14.0

value

TypeScript
set value(value: number)
Swift declaration
var 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 →