Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old


Sets leaderboard.

Component Version macOS Windows Linux Server iOS SDK
GameKit 8.5 ✅ Yes ❌ No ❌ No ❌ No ✅ Yes
MBS( "GameKit.GameCenterView.SetLeaderboardIdentifier"; leaderboardIdentifier )   More


Parameter Description Example
leaderboardIdentifier The leaderboard identifier for the leaderboard to use.


Returns OK or error.


Sets leaderboard.
The named leaderboard that is displayed by the view controller.

The leaderboardIdentifier property must either be empty or it must match a leaderboard identifier you defined when you created your leaderboards in App Store Connect. If empty, the view displays scores for the aggregate leaderboard. Default is empty.

When the leaderboard is presented, the value of this property determines which leaderboard content is displayed to the player. As the player changes which leaderboard content they view, the leaderboardIdentifier property is automatically updated. For example, to preserve the player’s selections, you can read the leaderboardIdentifier property after the screen is dismissed, and set that value the next time you initialize the view controller.

See also

This function is free to use.

Created 5th November 2018, last changed 8th November 2018

GameKit.GameCenterView.Present - GameKit.GameCenterView.SetLeaderboardTimeScope