---
title: "loadMatchData(completionHandler:)"
framework: gamekit
role: symbol
role_heading: Instance Method
path: "gamekit/gkturnbasedmatch/loadmatchdata(completionhandler:)"
---

# loadMatchData(completionHandler:)

Fetches your game-specific data that you store in Game Center when ending a turn, saving a turn, or leaving a match.

## Declaration

```swift
func loadMatchData(completionHandler: (@Sendable (Data?, (any Error)?) -> Void)? = nil)
```

```swift
func loadMatchData() async throws -> Data?
```

## Parameters

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

## Discussion

Discussion The matchData property is nil until you fetch the data from Game Center using this method.

## See Also

### Retrieving Match Details

- [matchID](gamekit/gkturnbasedmatch/matchid.md)
- [creationDate](gamekit/gkturnbasedmatch/creationdate.md)
- [participants](gamekit/gkturnbasedmatch/participants.md)
- [currentParticipant](gamekit/gkturnbasedmatch/currentparticipant.md)
- [status](gamekit/gkturnbasedmatch/status-swift.property.md)
- [GKTurnBasedMatch.Status](gamekit/gkturnbasedmatch/status-swift.enum.md)
- [matchData](gamekit/gkturnbasedmatch/matchdata.md)
- [matchDataMaximumSize](gamekit/gkturnbasedmatch/matchdatamaximumsize.md)
