<!--
{
  "availability" : [
    "iOS: 4.1.0 - 8.0.0",
    "iPadOS: 4.1.0 - 8.0.0",
    "macCatalyst: 13.1.0 - 13.1.0",
    "visionOS: 1.0.0 - 1.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKMatchDelegate/match(_:player:didChange:)-4eo7p",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(pl)GKMatchDelegate(im)match:player:didChangeState:"
  },
  "title" : "match(_:player:didChange:)"
}
-->

# match(_:player:didChange:)

Handles when a player connects or disconnects from a match.

```
optional func match(_ match: GKMatch, player playerID: String, didChange state: GKPlayerConnectionState)
```

## Parameters

`match`

The match that the player is connected to.

`playerID`

The identifier for the player whose state changed.

`state`

The state the player moved to.

## Discussion

Implement this method to be notified when players connect to or disconnect from the match.

---

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)