---
title: "loadLeaderboards(IDs:completionHandler:)"
framework: gamekit
role: symbol
role_heading: Type Method
path: "gamekit/gkleaderboard/loadleaderboards(ids:completionhandler:)"
---

# loadLeaderboards(IDs:completionHandler:)

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

## Declaration

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

```swift
class func loadLeaderboards(IDs leaderboardIDs: [String]?) async throws -> [GKLeaderboard]
```

## 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:

## Mentioned in

Creating recurring leaderboards Encourage progress and competition with leaderboards

## See Also

### Loading Leaderboards

- [loadPreviousOccurrence(completionHandler:)](gamekit/gkleaderboard/loadpreviousoccurrence(completionhandler:).md)
