<!--
{
  "availability" : [
    "iOS: 10.0.0 - 12.0.0",
    "iPadOS: 10.0.0 - 12.0.0",
    "macCatalyst: 13.1.0 - 13.1.0",
    "macOS: 10.12.0 - 10.14.0",
    "tvOS: 10.0.0 - 12.0.0",
    "visionOS: 1.0.0 - 1.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKGameSessionEventListener/session(_:didReceive:from:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(pl)GKGameSessionEventListener(im)session:didReceiveData:fromPlayer:"
  },
  "title" : "session(_:didReceive:from:)"
}
-->

# session(_:didReceive:from:)

Tells the listener the player received data from another player.

```
optional func session(_ session: GKGameSession, didReceive data: Data, from player: GKCloudPlayer)
```

## Parameters

`session`

The game session the sending player is associated with.

`data`

The data sent by the player.

`player`

The player sending data to all other connected players in the game session.

## Discussion

This event fires after the [`send(_:with:completionHandler:)`](/documentation/GameKit/GKGameSession/send(_:with:completionHandler:)) method has been called. All connected players except the calling player are notified.

---

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)