---
title: "player(_:wantsToQuitMatch:)"
framework: gamekit
role: symbol
role_heading: Instance Method
path: "gamekit/gkturnbasedeventlistener/player(_:wantstoquitmatch:)"
---

# player(_:wantsToQuitMatch:)

Handles when the current participant wants to quit a match.

## Declaration

```swift
optional func player(_ player: GKPlayer, wantsToQuitMatch match: GKTurnBasedMatch)
```

## Parameters

- `player`: The player who receives this turn-based event.
- `match`: The match that the current participant wants to quit.

## Mentioned in

Starting turn-based matches and passing turns between players

## Discussion

Discussion Implement this method to forfeit the match by passing the turn to the next participant using the  participantQuitInTurn(with:nextParticipants:turnTimeout:match:completionHandler:) method.

## See Also

### Handling Match-Related Events

- [player(_:receivedTurnEventFor:didBecomeActive:)](gamekit/gkturnbasedeventlistener/player(_:receivedturneventfor:didbecomeactive:).md)
- [player(_:didRequestMatchWithOtherPlayers:)](gamekit/gkturnbasedeventlistener/player(_:didrequestmatchwithotherplayers:).md)
- [player(_:matchEnded:)](gamekit/gkturnbasedeventlistener/player(_:matchended:).md)
- [player(_:didRequestMatchWithPlayers:)](gamekit/gkturnbasedeventlistener/player(_:didrequestmatchwithplayers:).md)
