---
title: "setDefaultLeaderboardCategoryID(_:completionHandler:)"
framework: gamekit
role: symbol
role_heading: Instance Method
path: "gamekit/gklocalplayer/setdefaultleaderboardcategoryid(_:completionhandler:)"
---

# setDefaultLeaderboardCategoryID(_:completionHandler:)

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

## Declaration

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

```swift
func setDefaultLeaderboardCategoryID(_ categoryID: String?) async throws
```

## 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:

## Discussion

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.

## See Also

### Deprecated methods

- [authenticate(completionHandler:)](gamekit/gklocalplayer/authenticate(completionhandler:).md)
- [generateIdentityVerificationSignature(completionHandler:)](gamekit/gklocalplayer/generateidentityverificationsignature(completionhandler:).md)
- [loadDefaultLeaderboardCategoryID(completionHandler:)](gamekit/gklocalplayer/loaddefaultleaderboardcategoryid(completionhandler:).md)
- [loadFriendPlayers(completionHandler:)](gamekit/gklocalplayer/loadfriendplayers(completionhandler:).md)
- [loadFriendsObsoleted(completionHandler:)](gamekit/gklocalplayer/loadfriendsobsoleted(completionhandler:).md)
