GameKit.GameCenterView.SetLeaderboardIdentifier
-----------------------------------------------

Sets leaderboard.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [GameKit](component_GameKit.md) | [8.5](newinversion85.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "GameKit.GameCenterView.SetLeaderboardIdentifier"; LeaderboardIdentifier ) 

**MBS**( **"GameKit.GameCenterView.SetLeaderboardIdentifier";** /\* Sets leaderboard. \*/  
**$LeaderboardIdentifier**) /\* The leaderboard identifier for the leaderboard to use. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| LeaderboardIdentifier | The leaderboard identifier for the leaderboard to use. |  |

### Result

Returns OK or error.

### Description

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

- [GameKit.GameCenterView.GetLeaderboardIdentifier](GameKitGameCenterViewGetLeaderboardIdentifier.md)
- [GameKit.GameCenterView.GetLeaderboardTimeScope](GameKitGameCenterViewGetLeaderboardTimeScope.md)
- [GameKit.GameCenterView.SetLeaderboardTimeScope](GameKitGameCenterViewSetLeaderboardTimeScope.md)

This function is free to use.

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

  
[GameKit.GameCenterView.Present](GameKitGameCenterViewPresent.md) - [GameKit.GameCenterView.SetLeaderboardTimeScope](GameKitGameCenterViewSetLeaderboardTimeScope.md)

[HTML Version](GameKitGameCenterViewSetLeaderboardIdentifier.shtml)