---
title: "handleTurnEvent(for:didBecomeActive:)"
framework: gamekit
role: symbol
role_heading: Instance Method
path: "gamekit/gkturnbasedeventhandlerdelegate/handleturnevent(for:didbecomeactive:)"
---

# handleTurnEvent(for:didBecomeActive:)

Sent to the delegate when it is the local player’s turn to act in a turn-based match.

## Declaration

```swift
func handleTurnEvent(for match: GKTurnBasedMatch, didBecomeActive: Bool)
```

## Parameters

- `match`: A match object containing the current state of the match.
- `didBecomeActive`: doc://com.apple.documentation/documentation/Swift/true if the game was launched or brought to the foreground to handle the event.

## Discussion

Discussion When your delegate receives this message, the player has accepted a push notification for a match already in progress. Your game should end whatever task it was performing and switch to the match information provided by the match object.

## See Also

### Receiving Turn-based Events

- [handleInvite(fromGameCenter:)](gamekit/gkturnbasedeventhandlerdelegate/handleinvite(fromgamecenter:).md)
- [handleTurnEvent(for:)](gamekit/gkturnbasedeventhandlerdelegate/handleturnevent(for:).md)
- [handleMatchEnded(_:)](gamekit/gkturnbasedeventhandlerdelegate/handlematchended(_:).md)
