<!--
{
  "availability" : [
    "iOS: 6.0.0 - 7.0.0",
    "iPadOS: 6.0.0 - 7.0.0",
    "macOS: 10.8.0 - 10.10.0",
    "visionOS: 1.0.0 - 1.0.0",
    "watchOS: 2.0.0 - 2.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKLocalPlayer/setDefaultLeaderboardCategoryID(_:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKLocalPlayer(im)setDefaultLeaderboardCategoryID:completionHandler:"
  },
  "title" : "setDefaultLeaderboardCategoryID(_:completionHandler:)"
}
-->

# setDefaultLeaderboardCategoryID(_:completionHandler:)

Sets the category identifier for the local player’s default leaderboard.

```
func setDefaultLeaderboardCategoryID(_ categoryID: String?, completionHandler: (@Sendable ((any Error)?) -> Void)? = nil)
```

## Parameters

`categoryID`

The category ID string for one of your game’s leaderboards.

`completionHandler`

A block to call when the request completes.

    The block receives the following parameter:

- error: If an error occurs, this parameter holds an error object that explains the error. Otherwise, the value of this parameter is `nil`.

## Discussion

You set the default leaderboard in App Store Connect when you configure your game’s leaderboards. All players normally start with this leaderboard as the default leaderboard. Calling this method changes the default leaderboard only for the local player.

---

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)