---
title: formattedValue
framework: gamekit
role: symbol
role_heading: Instance Property
path: gamekit/gkscore/formattedvalue
---

# formattedValue

Returns the player’s score as a localized string.

## Declaration

```swift
var formattedValue: String? { get }
```

## Discussion

Discussion 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. important: You may be tempted to write your own formatting code rather than using the formattedValue property. Do not do this. Using the built-in support makes it easy to localize the score value into other languages, and provides a string that is consistent with the presentation of your scores in the Game Center app.

## See Also

### Deprecated Methods and Properties

- [category](gamekit/gkscore/category.md)
- [context](gamekit/gkscore/context.md)
- [date](gamekit/gkscore/date.md)
- [leaderboardIdentifier](gamekit/gkscore/leaderboardidentifier.md)
- [player](gamekit/gkscore/player.md)
- [rank](gamekit/gkscore/rank.md)
- [value](gamekit/gkscore/value.md)
- [shouldSetDefaultLeaderboard](gamekit/gkscore/shouldsetdefaultleaderboard.md)
- [init(leaderboardIdentifier:)](gamekit/gkscore/init(leaderboardidentifier:).md)
- [init(leaderboardIdentifier:player:)](gamekit/gkscore/init(leaderboardidentifier:player:).md)
- [init(category:)](gamekit/gkscore/init(category:).md)
- [init(leaderboardIdentifier:forPlayer:)](gamekit/gkscore/init(leaderboardidentifier:forplayer:).md)
- [issueChallenge(toPlayers:message:)](gamekit/gkscore/issuechallenge(toplayers:message:).md)
- [playerID](gamekit/gkscore/playerid.md)
- [report(completionHandler:)](gamekit/gkscore/report(completionhandler:).md)
