setDefaultLeaderboardIdentifier(_:completionHandler:)
Sets the local player’s default leaderboard.
Declaration
func setDefaultLeaderboardIdentifier(_ leaderboardIdentifier: String, completionHandler: (@Sendable ((any Error)?) -> Void)? = nil)func setDefaultLeaderboardIdentifier(_ leaderboardIdentifier: String) async throwsParameters
- leaderboardIdentifier:
The identifier of the leaderboard.
- completionHandler:
The block that GameKit calls when it completes the request.
The block receives the following parameters:
- error
Describes an error if it occurs, or
nilif the operation completes.
Mentioned in
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.