<!--
{
  "availability" : [
    "iOS: 4.1.0 - 14.0.0",
    "iPadOS: 4.1.0 - 14.0.0",
    "macCatalyst: 13.1.0 - 14.0.0",
    "macOS: 10.8.0 - 11.0.0",
    "tvOS: 9.0.0 - 14.0.0",
    "visionOS: 1.0.0 - 1.0.0",
    "watchOS: 3.0.0 - 7.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKScore",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKScore"
  },
  "title" : "GKScore"
}
-->

# GKScore

An object containing information for a score that was earned by the player.

```
class GKScore
```

## Overview> Important:
> Your game must initialize a local player before you can use any Game Center classes. If there is no initialized player, your game receives a ``doc://com.apple.gamekit/documentation/GameKit/GKError/Code/notAuthenticated`` error. For more information, see <doc://com.apple.gamekit/documentation/GameKit/authenticating-a-player>.

Your game creates `GKScore` objects to post scores to a leaderboard on Game Center. When your game retrieves score information from a leaderboard, those scores are returned as `GKScore` objects.

Scores and leaderboards work together to help you create a better game. Whenever a new `GKScore` object is created, it is associated with a leaderboard. You must ensure that the score being sent to a leaderboard is compatible with the leaderboard scoring format set in App Store Connect. See [Leaderboards and Leaderboard Sets](https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/iTunesConnectGameCenter_Guide/Leaderboards/Leaderboards.html#//apple_ref/doc/uid/TP40013726-CH2) for information on how to create a leaderboard in App Store Connect.

To report a score to Game Center, your game allocates and initializes a new object, sets the [`value`](/documentation/GameKit/GKScore/value) property to the score the player earned, and then calls the [`report(completionHandler:)`](/documentation/GameKit/GKScore/report(completionHandler:)) method. The mechanism your game uses to calculate scores is up to you to design; scores are only compared within your game.

## Topics

### Reporting a New Score

[`report(_:withEligibleChallenges:withCompletionHandler:)`](/documentation/GameKit/GKScore/report(_:withEligibleChallenges:withCompletionHandler:)-2tycl)

Submits a list of scores and all eligible challenges.

[`report(_:withCompletionHandler:)`](/documentation/GameKit/GKScore/report(_:withCompletionHandler:))

Reports a list of scores to Game Center

[`report(_:withEligibleChallenges:withCompletionHandler:)`](/documentation/GameKit/GKScore/report(_:withEligibleChallenges:withCompletionHandler:)-3c5lh)

Submits a list of scores and all eligible challenges.

### Issuing a Score Challenge

[`challengeComposeController(withMessage:players:completion:)`](/documentation/GameKit/GKScore/challengeComposeController(withMessage:players:completion:))

Provides a challenge compose view controller with preselected player identifiers and a preformatted, player-editable message.

[`GKChallengeComposeHandler`](/documentation/GameKit/GKChallengeComposeHandler)

A completion block that provides information about the player who issues a challenge and the players who receive it.

[`challengeComposeController(withMessage:players:completionHandler:)`](/documentation/GameKit/GKScore/challengeComposeController(withMessage:players:completionHandler:))

Provides a challenge compose view controller with pre-selected player identifiers and a preformatted, player-editable message.

[`challengeComposeController(withPlayers:message:completionHandler:)`](/documentation/GameKit/GKScore/challengeComposeController(withPlayers:message:completionHandler:))

Provides a challenge compose view controller with pre-selected player identifiers and a preformatted, player-editable message.

### Deprecated Methods and Properties

[`category`](/documentation/GameKit/GKScore/category)

The leaderboard that this score belongs to.

[`context`](/documentation/GameKit/GKScore/context)

An integer value used by your game.

[`date`](/documentation/GameKit/GKScore/date)

The date and time when the score was earned.

[`formattedValue`](/documentation/GameKit/GKScore/formattedValue)

Returns the player’s score as a localized string.

[`leaderboardIdentifier`](/documentation/GameKit/GKScore/leaderboardIdentifier)

The identifier for the leaderboard.

[`player`](/documentation/GameKit/GKScore/player)

The player who earned the score.

[`rank`](/documentation/GameKit/GKScore/rank)

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

[`value`](/documentation/GameKit/GKScore/value)

The score earned by the player.

[`shouldSetDefaultLeaderboard`](/documentation/GameKit/GKScore/shouldSetDefaultLeaderboard)

A Boolean value that indicates whether this score should also update the default leaderboard.

[`init(leaderboardIdentifier:)`](/documentation/GameKit/GKScore/init(leaderboardIdentifier:))

Returns an initialized score object using the local player and the current date.

[`init(leaderboardIdentifier:player:)`](/documentation/GameKit/GKScore/init(leaderboardIdentifier:player:))

Returns an initialized score object for the specified leaderboard and player.

[`init(category:)`](/documentation/GameKit/GKScore/init(category:))

Returns an initialized score object.

[`init(leaderboardIdentifier:forPlayer:)`](/documentation/GameKit/GKScore/init(leaderboardIdentifier:forPlayer:))

Returns an initialized score object for the specified leaderboard and player.

[`issueChallenge(toPlayers:message:)`](/documentation/GameKit/GKScore/issueChallenge(toPlayers:message:))

Issues a score challenge to a set of players.

[`playerID`](/documentation/GameKit/GKScore/playerID)

The player identifier for the player that earned the score.

[`report(completionHandler:)`](/documentation/GameKit/GKScore/report(completionHandler:))

Reports a score to Game Center.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)