---
title: "player(_:wantsToPlay:)"
framework: gamekit
role: symbol
role_heading: Instance Method
path: "gamekit/gkchallengelistener/player(_:wantstoplay:)"
---

# player(_:wantsToPlay:)

Handles when the local player issues a challenge and the other player accepts.

## Declaration

```swift
optional func player(_ player: GKPlayer, wantsToPlay challenge: GKChallenge)
```

## Parameters

- `player`: The player who accepts the challenge.
- `challenge`: The challenge that the player issues to another player.

## See Also

### Responding to a Challenge

- [player(_:didReceive:)](gamekit/gkchallengelistener/player(_:didreceive:).md)
