<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKLocalPlayer/resolveConflictingSavedGames(_:with:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKLocalPlayer(im)resolveConflictingSavedGames:withData:completionHandler:"
  },
  "title" : "resolveConflictingSavedGames(_:with:completionHandler:)"
}
-->

# resolveConflictingSavedGames(_:with:completionHandler:)

Replaces duplicate saved games that use the same filename with one file containing the specified game data.

```
func resolveConflictingSavedGames(_ conflictingSavedGames: [GKSavedGame], with data: Data, completionHandler handler: (@Sendable ([GKSavedGame]?, (any Error)?) -> Void)? = nil)
```

## Parameters

`conflictingSavedGames`

The saved games that contain the conflicts.

`data`

The correct game data to save.

`handler`

The block that this method calls when it completes the request.

    The block receives the following parameters:

- savedGames: The resolved saved games that you include in `conflictingSavedGames`, and any other saved games GameKit finds with conflicts that you don’t include in `conflictingSavedGames`.

    For example, if there are five saved game files with the same filename, but only three are in     `conflictingSavedGames`    , this parameter contains the three saved games you provide and the two saved games GameKit finds.

- error: Describes an error if it occurs, or `nil` if the operation completes.

## Discussion

Implement the [`player(_:hasConflictingSavedGames:)`](/documentation/GameKit/GKSavedGameListener/player(_:hasConflictingSavedGames:)) protocol method to choose the correct game data when there’s a conflict. Then call this method separately for each set of saved games that contain file conflicts. For example, if multiple saved games use the `savedgame1` and `savedgame2` filenames, call this method once for the saved games that use the `savedgame1` filename, and once for the saved games that use the `savedgame2` filename.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)