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

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

Submits a score to the leaderboard.

## Declaration

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

```swift
func submitScore(_ score: Int, context: Int, player: GKPlayer) 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.
- `completionHandler`: A block that GameKit calls when this method adds the score. The block receives the following parameters:

## Mentioned in

Creating recurring leaderboards Creating engaging challenges from leaderboards Choosing a leaderboard for your challenges Encourage progress and competition with leaderboards

## See Also

### Submitting Scores

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