---
title: "player(_:receivedTurnEventFor:didBecomeActive:)"
framework: gamekit
role: symbol
role_heading: Instance Method
path: "gamekit/gkturnbasedeventlistener/player(_:receivedturneventfor:didbecomeactive:)"
---

# player(_:receivedTurnEventFor:didBecomeActive:)

Handles turn-based match events, such as accepting invitations, passing turns, and saving match data.

## Declaration

```swift
optional func player(_ player: GKPlayer, receivedTurnEventFor match: GKTurnBasedMatch, didBecomeActive: Bool)
```

## Parameters

- `player`: The player who receives this turn-based event.
- `match`: The match related to this turn-based event.
- `didBecomeActive`: doc://com.apple.documentation/documentation/Swift/true if the system launches the game to deliver the turn-based event; otherwise, doc://com.apple.documentation/documentation/Swift/false.

## Mentioned in

Starting turn-based matches and passing turns between players Sending messages to players in turn-based games Exchanging data between players in turn-based games

## Discussion

Discussion GameKit invokes this method when these turn-based events occur: GameKit passes the turn to the player. The player accepts an invitation from another participant. The timeout for the player to take their turn is about to expire. A participant saves match data to Game Center. Another participant sends a reminder to the player. The player opens an existing or completed match. The player forfeits a match.

## See Also

### Handling Match-Related Events

- [player(_:didRequestMatchWithOtherPlayers:)](gamekit/gkturnbasedeventlistener/player(_:didrequestmatchwithotherplayers:).md)
- [player(_:matchEnded:)](gamekit/gkturnbasedeventlistener/player(_:matchended:).md)
- [player(_:wantsToQuitMatch:)](gamekit/gkturnbasedeventlistener/player(_:wantstoquitmatch:).md)
- [player(_:didRequestMatchWithPlayers:)](gamekit/gkturnbasedeventlistener/player(_:didrequestmatchwithplayers:).md)
