Sets the default leaderboard for the current game.
- iOS 7.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 3.0+
The identifier of the leaderboard to be set as the default leaderboard.
A block to be called when the request completes.
The block receives the following parameters:
If an error occurred, this parameter holds an error object that explains the error. Otherwise, the value of this parameter is
When this method is called, it creates a new background task to handle the request. The method then returns control to your game. Later, when the task is complete, Game Kit calls your completion handler. The completion handler is always called on the main thread.
The default leaderboard is configured in App Store Connect as part of configuring 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.