<!--
{
  "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 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKInviteEventListener/player(_:didAccept:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(pl)GKInviteEventListener(im)player:didAcceptInvite:"
  },
  "title" : "player(_:didAccept:)"
}
-->

# player(_:didAccept:)

Handles the event when the local player accepts an invitation from another player.

```
optional func player(_ player: GKPlayer, didAccept invite: GKInvite)
```

## Parameters

`player`

The local player who accepts the invitation.

`invite`

The invitation that the local player accepts.

## Discussion

This method presents the matchmaker view controller in the invitation state so that the local player can see other players in the match accept their invitations.

## See Also

[Finding multiple players for a game](/documentation/GameKit/finding-multiple-players-for-a-game)

Discover and invite other players to participate in a real-time game.



---

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)