<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKTurnBasedMatch/saveMergedMatch(_:withResolvedExchanges:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKTurnBasedMatch(im)saveMergedMatchData:withResolvedExchanges:completionHandler:"
  },
  "title" : "saveMergedMatch(_:withResolvedExchanges:completionHandler:)"
}
-->

# saveMergedMatch(_:withResolvedExchanges:completionHandler:)

Saves match data for completed exchanges without ending the turn.

```
func saveMergedMatch(_ matchData: Data, withResolvedExchanges exchanges: [GKTurnBasedExchange], completionHandler: (@Sendable ((any Error)?) -> Void)? = nil)
```

## Parameters

`matchData`

Your game-specific data representing the match state including the resolved exchange data.

`exchanges`

The completed exchanges that you resolve or merge into the match data.

`completionHandler`

The block that GameKit calls when it completes the request.

    The block receives the following parameter:

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

## Discussion

Use this method to save the exchange data in the match’s [`completedExchanges`](/documentation/GameKit/GKTurnBasedMatch/completedExchanges) property before the current participant ends their turn, forfeits a match, or ends a match. Alternatively, invoke this method from the [`player(_:receivedExchangeReplies:forCompletedExchange:for:)`](/documentation/GameKit/GKTurnBasedEventListener/player(_:receivedExchangeReplies:forCompletedExchange:for:)) protocol method as recipients reply to individual exchange requests.

This method removes the exchanges from the current participant’s `completedExchanges` property and all participant’s [`exchanges`](/documentation/GameKit/GKTurnBasedMatch/exchanges) property. So retain your game-specific exchange data and merge it into the match data, before you invoke this method.

---

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)