An object that organizes leaderboards into logical and coherent groups.


A GKLeaderboardSet object is used to read data from a leaderboard set stored on Game Center. Your game uses GKLeaderboardSet objects when it wants to retrieve localized information about a specific leaderboard set or to retrieve scores from a leaderboard set. Typically, you do this when you want the data needed to implement your own custom leaderboard set user interface.

After incorporating leaderboard sets into your app, you must put all of your leaderboards into a set. Individual leaderboards can be put into multiple leaderboard sets and given different display names in each set.

During the development process, you create the leaderboard sets for your game on iTunes Connect.

To retrieve information about the available leaderboards for the current set, use the loadLeaderboards(completionHandler:) class method.

To retrieve information about the available leaderboard sets, use the loadLeaderboardSets(completionHandler:) class method.

To retrieve information about the image associated with a leaderboard set, use the loadImage(completionHandler:) class method.


Loading the Leaderboard Sets

func loadImage(completionHandler: ((UIImage?, Error?) -> Void)? = nil)

Load the image associated with the leaderboard set.

func loadLeaderboards(completionHandler: (([GKLeaderboard]?, Error?) -> Void)? = nil)

Load all of the leaderboards for the current leaderboard set.

var title: String

Localized title for the leaderboard set.

var identifier: String?

The identifier for the leaderboard set.

var groupIdentifier: String?

Identifies the group that the leaderboard set belongs to.


Inherits From