---
title: "loadMatches(completionHandler:)"
framework: gamekit
role: symbol
role_heading: Type Method
path: "gamekit/gkturnbasedmatch/loadmatches(completionhandler:)"
---

# loadMatches(completionHandler:)

Fetches the turn-based matches from Game Center that the local player participates in.

## Declaration

```swift
class func loadMatches(completionHandler: (@Sendable ([GKTurnBasedMatch]?, (any Error)?) -> Void)? = nil)
```

```swift
class func loadMatches() async throws -> [GKTurnBasedMatch]
```

## Parameters

- `completionHandler`: The block that GameKit calls when it completes the request. The block receives the following parameters:

## Mentioned in

Starting turn-based matches and passing turns between players

## Discussion

Discussion The matchData properties of the match objects are nil until you fetch the data from Game Center using the loadMatchData(completionHandler:) method.

## See Also

### Loading Existing Matches

- [load(withID:withCompletionHandler:)](gamekit/gkturnbasedmatch/load(withid:withcompletionhandler:).md)
