<!--
{
  "availability" : [
    "iOS: 6.0.0 - 14.0.0",
    "iPadOS: 6.0.0 - 14.0.0",
    "macCatalyst: 13.1.0 - 14.0.0",
    "macOS: 10.8.0 - 11.0.0",
    "tvOS: 9.0.0 - 14.0.0",
    "visionOS: 1.0.0 - 1.0.0",
    "watchOS: 3.0.0 - 7.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKLeaderboard/loadLeaderboards(completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKLeaderboard(cm)loadLeaderboardsWithCompletionHandler:"
  },
  "title" : "loadLeaderboards(completionHandler:)"
}
-->

# loadLeaderboards(completionHandler:)

Loads a list of leaderboards from Game Center.

```
class func loadLeaderboards(completionHandler: (@Sendable ([GKLeaderboard]?, (any Error)?) -> Void)? = nil)
```

## Parameters

`completionHandler`

A block to call when loading the leaderboards.

    The block receives the following parameters:

- *leaderboards*: An array of `GKLeaderboard` objects that provides the leaderboards for your game. If an error occurs, this value may be non-`nil`. In this case, the array holds whatever data GameKit downloads before the error occurs.
- *error*: If an error occurs, this error object describes the error. If the operation completes successfully, the value is `nil`.

## Discussion

Use this class method to retrieve the list of leaderboards you configure in App Store Connect. Use the properties of each leaderboard object, especially the [`category`](/documentation/GameKit/GKLeaderboard/category) and [`title`](/documentation/GameKit/GKLeaderboard/title) properties, to learn more about the leaderboard.

```objc
- (void) loadLeaderboardInfo
{
    [GKLeaderboard loadLeaderboardsWithCompletionHandler:^(NSArray *leaderboards, NSError *error) {
        self.leaderboards = leaderboards;
     }];
}
```

When you call this method, it creates a new background task to handle the request. The method then returns control to your game. When the task is complete, GameKit calls your completion handler on the main thread.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)