---
title: "fetchSavedGames(completionHandler:)"
framework: gamekit
role: symbol
role_heading: Instance Method
path: "gamekit/gklocalplayer/fetchsavedgames(completionhandler:)"
---

# fetchSavedGames(completionHandler:)

Retrieves all available saved games.

## Declaration

```swift
func fetchSavedGames(completionHandler handler: (@Sendable ([GKSavedGame]?, (any Error)?) -> Void)? = nil)
```

```swift
func fetchSavedGames() async throws -> [GKSavedGame]
```

## 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

## Discussion

Discussion If more than one saved game has the same filename, a conflict occurs and you must choose which saved game filename is correct using the resolveConflictingSavedGames(_:with:completionHandler:) method.

## See Also

### Saving Game Data

- [Saving the player’s game data to an iCloud account](gamekit/saving-the-player-s-game-data-to-an-icloud-account.md)
- [saveGameData(_:withName:completionHandler:)](gamekit/gklocalplayer/savegamedata(_:withname:completionhandler:).md)
- [resolveConflictingSavedGames(_:with:completionHandler:)](gamekit/gklocalplayer/resolveconflictingsavedgames(_:with:completionhandler:).md)
- [deleteSavedGames(withName:completionHandler:)](gamekit/gklocalplayer/deletesavedgames(withname:completionhandler:).md)
- [GKSavedGame](gamekit/gksavedgame.md)
- [GKSavedGameListener](gamekit/gksavedgamelistener.md)
