<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKMatchDelegate/match(_:didReceive:forRecipient:fromRemotePlayer:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(pl)GKMatchDelegate(im)match:didReceiveData:forRecipient:fromRemotePlayer:"
  },
  "title" : "match(_:didReceive:forRecipient:fromRemotePlayer:)"
}
-->

# match(_:didReceive:forRecipient:fromRemotePlayer:)

Processes the data sent from one player to another.

```
optional func match(_ match: GKMatch, didReceive data: Data, forRecipient recipient: GKPlayer, fromRemotePlayer player: GKPlayer)
```

## Parameters

`match`

The match associated with the data.

`data`

The data sent by the player.

`recipient`

The player who receives the data.

`player`

The player who sends the data.

## Discussion

Your game defines its own format for data packets it transmits and receives over the network.

> Important:
> You need to treat data you receive from other players as *untrusted* data. Be sure to validate the data you receive from the match and write your code carefully to avoid security vulnerabilities.

---

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)