---
title: "cancelPendingInvite(to:)"
framework: gamekit
role: symbol
role_heading: Instance Method
path: "gamekit/gkmatchmaker/cancelpendinginvite(to:)"
---

# cancelPendingInvite(to:)

Cancels a pending invitation to another player.

## Declaration

```swift
func cancelPendingInvite(to player: GKPlayer)
```

## Parameters

- `player`: The player that GameKit sends the invitation to.

## See Also

### Matching players

- [findMatch(for:withCompletionHandler:)](gamekit/gkmatchmaker/findmatch(for:withcompletionhandler:).md)
- [findPlayers(forHostedRequest:withCompletionHandler:)](gamekit/gkmatchmaker/findplayers(forhostedrequest:withcompletionhandler:).md)
- [findMatchedPlayers(_:withCompletionHandler:)](gamekit/gkmatchmaker/findmatchedplayers(_:withcompletionhandler:).md)
- [GKMatchedPlayers](gamekit/gkmatchedplayers.md)
- [addPlayers(to:matchRequest:completionHandler:)](gamekit/gkmatchmaker/addplayers(to:matchrequest:completionhandler:).md)
- [finishMatchmaking(for:)](gamekit/gkmatchmaker/finishmatchmaking(for:).md)
- [cancel()](gamekit/gkmatchmaker/cancel().md)
