---
title: "handleMatchEnded(_:)"
framework: gamekit
role: symbol
role_heading: Instance Method
path: "gamekit/gkturnbasedeventhandlerdelegate/handlematchended(_:)"
---

# handleMatchEnded(_:)

Sent to the delegate when a match the local player is participating in has ended.

## Declaration

```swift
optional func handleMatchEnded(_ match: GKTurnBasedMatch)
```

## Parameters

- `match`: The match that just ended.

## Discussion

Discussion When your delegate receives this message, it should display the match’s final results to the player and allow the player the option of saving or removing the match data from Game Center.

## See Also

### Receiving Turn-based Events

- [handleInvite(fromGameCenter:)](gamekit/gkturnbasedeventhandlerdelegate/handleinvite(fromgamecenter:).md)
- [handleTurnEvent(for:)](gamekit/gkturnbasedeventhandlerdelegate/handleturnevent(for:).md)
- [handleTurnEvent(for:didBecomeActive:)](gamekit/gkturnbasedeventhandlerdelegate/handleturnevent(for:didbecomeactive:).md)
