<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKTurnBasedEventListener",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(pl)GKTurnBasedEventListener"
  },
  "title" : "GKTurnBasedEventListener"
}
-->

# GKTurnBasedEventListener

The protocol that handles turn-based and data-exchange events between participants in a match.

```
protocol GKTurnBasedEventListener
```

## Overview

To receive the `GKTurnBasedEventListener` call backs, register your game object with the local player object immediately after initialization.

```swift
GKLocalPlayer.local.register(self)
```

Adopt the [`GKLocalPlayerListener`](/documentation/GameKit/GKLocalPlayerListener) protocol to handle a variety of Game Center events instead of the individual [`GKChallengeListener`](/documentation/GameKit/GKChallengeListener), [`GKInviteEventListener`](/documentation/GameKit/GKInviteEventListener), [`GKSavedGameListener`](/documentation/GameKit/GKSavedGameListener), and [`GKTurnBasedEventListener`](/documentation/GameKit/GKTurnBasedEventListener) protocols.

Then implement the [`player(_:receivedTurnEventFor:didBecomeActive:)`](/documentation/GameKit/GKTurnBasedEventListener/player(_:receivedTurnEventFor:didBecomeActive:)) and other `GKTurnBasedEventListener` protocol methods to handle turn-based events that occur throughout a match.

## Topics

### Handling Match-Related Events

[`-  player:receivedTurnEventForMatch:didBecomeActive:`](/documentation/GameKit/GKTurnBasedEventListener/player(_:receivedTurnEventFor:didBecomeActive:))

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

[`-  player:didRequestMatchWithOtherPlayers:`](/documentation/GameKit/GKTurnBasedEventListener/player(_:didRequestMatchWithOtherPlayers:))

Handles when the player uses Game Center to start a match with other players.

[`-  player:matchEnded:`](/documentation/GameKit/GKTurnBasedEventListener/player(_:matchEnded:))

Handles when the match ends.

[`-  player:wantsToQuitMatch:`](/documentation/GameKit/GKTurnBasedEventListener/player(_:wantsToQuitMatch:))

Handles when the current participant wants to quit a match.

[`-  player:didRequestMatchWithPlayers:`](/documentation/GameKit/GKTurnBasedEventListener/player(_:didRequestMatchWithPlayers:))

Handles when the player uses Game Center to start a match with other players.

### Handling Data Exchanges

[`-  player:receivedExchangeRequest:forMatch:`](/documentation/GameKit/GKTurnBasedEventListener/player(_:receivedExchangeRequest:for:))

Handles when the local player receives an exchange request from another participant.

[`-  player:receivedExchangeReplies:forCompletedExchange:forMatch:`](/documentation/GameKit/GKTurnBasedEventListener/player(_:receivedExchangeReplies:forCompletedExchange:for:))

Handles when all recipients of an exchange request respond.

[`-  player:receivedExchangeCancellation:forMatch:`](/documentation/GameKit/GKTurnBasedEventListener/player(_:receivedExchangeCancellation:for:))

Handles when the sender cancels an exchange request they intiated.

## Relationships

### Inherited By

[`GKLocalPlayerListener`](/documentation/GameKit/GKLocalPlayerListener)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)