---
title: "player(_:didAccept:)"
framework: gamekit
role: symbol
role_heading: Instance Method
path: "gamekit/gkinviteeventlistener/player(_:didaccept:)"
---

# player(_:didAccept:)

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

## Declaration

```swift
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.

## Mentioned in

Finding multiple players for a game

## Discussion

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

### Related Documentation

- [Finding multiple players for a game](gamekit/finding-multiple-players-for-a-game.md)

### Starting a New Match

- [player(_:didRequestMatchWithRecipients:)](gamekit/gkinviteeventlistener/player(_:didrequestmatchwithrecipients:).md)
- [player(_:didRequestMatchWithPlayers:)](gamekit/gkinviteeventlistener/player(_:didrequestmatchwithplayers:).md)
