<!--
{
  "availability" : [
    "iOS: 7.0.0 - 14.0.0",
    "iPadOS: 7.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"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKGameCenterViewController/leaderboardIdentifier",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKGameCenterViewController(py)leaderboardIdentifier"
  },
  "title" : "leaderboardIdentifier"
}
-->

# leaderboardIdentifier

The named leaderboard that the view controller displays.

```
var leaderboardIdentifier: String? { get set }
```

## Discussion

The [`leaderboardIdentifier`](/documentation/GameKit/GKGameCenterViewController/leaderboardIdentifier) property must either be `nil` or it must match a leaderboard identifier you defined when you created your leaderboards in App Store Connect. If `nil`, the view displays scores for the aggregate leaderboard. Default is `nil`.

When the leaderboard is presented, the value of this property determines which leaderboard content is displayed to the player. As the player changes which leaderboard content they view, the [`leaderboardIdentifier`](/documentation/GameKit/GKGameCenterViewController/leaderboardIdentifier) property is automatically updated. For example, to preserve the player’s selections, you can read the [`leaderboardIdentifier`](/documentation/GameKit/GKGameCenterViewController/leaderboardIdentifier) property after the screen is dismissed, and set that value the next time you initialize the view controller.

---

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)