<!--
{
  "availability" : [
    "iOS: 8.0.0 - 14.0.0",
    "iPadOS: 8.0.0 - 14.0.0",
    "macCatalyst: 13.1.0 - 14.0.0",
    "macOS: 10.10.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/init(leaderboardIdentifier:player:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKScore(im)initWithLeaderboardIdentifier:player:"
  },
  "title" : "init(leaderboardIdentifier:player:)"
}
-->

# init(leaderboardIdentifier:player:)

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

```
init(leaderboardIdentifier identifier: String, player: GKPlayer)
```

## Parameters

`identifier`

Identifies the leaderboard that the score is being sent to.

`player`

The [`GKPlayer`](/documentation/GameKit/GKPlayer) object identifying the player who’s score is being initialized.

## Return Value

An initialized score object, or `nil` if an error occurred.

## Discussion

Your game explicitly allocates and initializes a score object using the designated player and current date when it needs to report a new 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)