---
title: "loadData(completionHandler:)"
framework: gamekit
role: symbol
role_heading: Instance Method
path: "gamekit/gksavedgame/loaddata(completionhandler:)"
---

# loadData(completionHandler:)

Loads the game data from the file.

## Declaration

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

```swift
func loadData() async throws -> Data
```

## Parameters

- `handler`: The block that this method calls when it completes the request. The block receives the following parameters:

## Mentioned in

Saving the player’s game data to an iCloud account
