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

# loadLeaderboards(IDs:completionHandler:)

Loads leaderboards for the specified leaderboard IDs that Game Center uses.

```
class func loadLeaderboards(IDs leaderboardIDs: [String]?, completionHandler: @escaping @Sendable ([GKLeaderboard]?, (any Error)?) -> Void)
```

## Parameters

`leaderboardIDs`

An array of leaderboard IDs that Game Center uses.

`completionHandler`

A block that GameKit calls when this method loads the leaderboards.

    The block receives the following parameters:

- leaderboards: The leaderboards that match the IDs.
- error: Describes an error if it occurs, or `nil` if the operation completes.

## Discussion

---

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)