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

# setDefaultLeaderboardIdentifier(_:completionHandler:)

Sets the local player’s default leaderboard.

## Declaration

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

```swift
func setDefaultLeaderboardIdentifier(_ leaderboardIdentifier: String) async throws
```

## Parameters

- `leaderboardIdentifier`: The identifier of the leaderboard.
- `completionHandler`: The block that GameKit calls when it completes the request. The block receives the following parameters:

## Mentioned in

Encourage progress and competition with leaderboards

## Discussion

Discussion Until you change the default leaderboard for a player, it is the same as the default leaderboard for your game that you set in App Store Connect.

## See Also

### Working with Leaderboards

- [loadDefaultLeaderboardIdentifier(completionHandler:)](gamekit/gklocalplayer/loaddefaultleaderboardidentifier(completionhandler:).md)
