---
title: "declineInvite(completionHandler:)"
framework: gamekit
role: symbol
role_heading: Instance Method
path: "gamekit/gkturnbasedmatch/declineinvite(completionhandler:)"
---

# declineInvite(completionHandler:)

Declines an invitation for the local player to join a turn-based match.

## Declaration

```swift
func declineInvite(completionHandler: (@Sendable ((any Error)?) -> Void)? = nil)
```

```swift
func declineInvite() async throws
```

## Parameters

- `completionHandler`: The block that GameKit calls when it completes the request. The block receives the following parameter:

## Mentioned in

Starting turn-based matches and passing turns between players

## Discussion

Discussion When you provide a custom interface for managing matches, use this method to programmatically decline an invitation on behalf of the local player.

## See Also

### Creating a Match

- [find(for:withCompletionHandler:)](gamekit/gkturnbasedmatch/find(for:withcompletionhandler:).md)
- [acceptInvite(completionHandler:)](gamekit/gkturnbasedmatch/acceptinvite(completionhandler:).md)
- [rematch(completionHandler:)](gamekit/gkturnbasedmatch/rematch(completionhandler:).md)
