<!--
{
  "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/GKLeaderboardSet/loadLeaderboards(handler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKLeaderboardSet(im)loadLeaderboardsWithHandler:"
  },
  "title" : "loadLeaderboards(handler:)"
}
-->

# loadLeaderboards(handler:)

Loads the leaderboards in the leaderboard set.

```
func loadLeaderboards(handler: @escaping ([GKLeaderboard]?, (any Error)?) -> Void)
```

## Parameters

`handler`

A block that GameKit calls when this method completes the request.

    The block receives the following parameters:

- *leaderboards*: The leaderboards in the leaderboard set.
- *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)