<!--
{
  "availability" : [
    "iOS: 6.0.0 - 7.0.0",
    "iPadOS: 6.0.0 - 7.0.0",
    "macOS: 10.8.0 - 10.10.0",
    "visionOS: 1.0.0 - 1.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKChallengeEventHandlerDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(pl)GKChallengeEventHandlerDelegate"
  },
  "title" : "GKChallengeEventHandlerDelegate"
}
-->

# GKChallengeEventHandlerDelegate

You implement the [`GKChallengeEventHandlerDelegate`](/documentation/GameKit/GKChallengeEventHandlerDelegate) delegate to control how challenges are displayed in your game.

```
protocol GKChallengeEventHandlerDelegate : NSObjectProtocol
```

## Overview

By default, GameKit briefly displays a banner over your game when any of the following events occur:

- The local player receives a challenge.
- The local player completes a challenge.
- A remote player completes a challenge issued by the local player.

Your event handler can override or extend this behavior:

- It can prevent a banner from being displayed.
- It can be notified when a player taps in a banner.
- It can handle the events directly.

## Topics

### Detecting When a User Taps a Banner

[`localPlayerDidSelect(_:)`](/documentation/GameKit/GKChallengeEventHandlerDelegate/localPlayerDidSelect(_:))

Called when the local player selects a challenge banner displayed by GameKit.

### Responding When a New Challenge is Received

[`localPlayerDidReceive(_:)`](/documentation/GameKit/GKChallengeEventHandlerDelegate/localPlayerDidReceive(_:))

Called when the local player receives a new challenge.

[`shouldShowBanner(forLocallyReceivedChallenge:)`](/documentation/GameKit/GKChallengeEventHandlerDelegate/shouldShowBanner(forLocallyReceivedChallenge:))

Called to determine whether a banner should be shown when the local player receives a challenge.

### Responding to Challenges Completed By the Local Player

[`localPlayerDidComplete(_:)`](/documentation/GameKit/GKChallengeEventHandlerDelegate/localPlayerDidComplete(_:))

Called when the local player completes a challenge.

[`shouldShowBanner(forLocallyCompletedChallenge:)`](/documentation/GameKit/GKChallengeEventHandlerDelegate/shouldShowBanner(forLocallyCompletedChallenge:))

Called to determine whether a banner should be shown when the local player completes a challenge.

### Responding to Challenges Issued by the Local Player

[`remotePlayerDidComplete(_:)`](/documentation/GameKit/GKChallengeEventHandlerDelegate/remotePlayerDidComplete(_:))

Called when a remote player completes a challenge issued by the local player.

[`shouldShowBanner(forRemotelyCompletedChallenge:)`](/documentation/GameKit/GKChallengeEventHandlerDelegate/shouldShowBanner(forRemotelyCompletedChallenge:))

Called to determine whether a banner should be shown when a remote player completes a challenge.



---

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)