Instance Property


Returns the player’s score as a localized string.


var formattedValue: String? { get }


This property is invalid on a newly initialized score object. On a score returned from GameKit, it contains a formatted string based on the player’s score. You determine how a score is formatted when you define the leaderboard in App Store Connect.

Never convert the value property into a string directly; always use this method to receive the formatted string.

See Also

Score Properties

var context: UInt64

An integer value used by your game.

var date: Date

The date and time when the score was earned.

var leaderboardIdentifier: String

The identifier for the leaderboard.

var player: GKPlayer

The player identifier for the player that earned the score.

var rank: Int

The position of the score in the results of a leaderboard search.

var value: Int64

The score earned by the player.