---
title: "submitScore(_:context:player:leaderboardIDs:completionHandler:)"
framework: gamekit
role: symbol
role_heading: Type Method
path: "gamekit/gkleaderboard/submitscore(_:context:player:leaderboardids:completionhandler:)"
---

# submitScore(_:context:player:leaderboardIDs:completionHandler:)

Submits a score to multiple leaderboards.

## Declaration

```swift
class func submitScore(_ score: Int, context: Int, player: GKPlayer, leaderboardIDs: [String], completionHandler: @escaping @Sendable ((any Error)?) -> Void)
```

```swift
class func submitScore(_ score: Int, context: Int, player: GKPlayer, leaderboardIDs: [String]) async throws
```

## Parameters

- `score`: The score that the player earns.
- `context`: An integer value that your game uses.
- `player`: The player who earns the score.
- `leaderboardIDs`: The IDs that Game Center uses for the leaderboards to submit the score to.
- `completionHandler`: A block that GameKit calls when this method adds the score. The block receives the following parameters:

## Mentioned in

Creating recurring leaderboards Encourage progress and competition with leaderboards

## See Also

### Submitting Scores

- [submitScore(_:context:player:completionHandler:)](gamekit/gkleaderboard/submitscore(_:context:player:completionhandler:).md)
