---
title: GKMatchmakerViewControllerDelegate
framework: gamekit
role: symbol
role_heading: Protocol
path: gamekit/gkmatchmakerviewcontrollerdelegate
---

# GKMatchmakerViewControllerDelegate

An object that handles when the status of matchmaking changes.

## Declaration

```swift
protocol GKMatchmakerViewControllerDelegate : NSObjectProtocol
```

## Mentioned in

Finding multiple players for a game

## Overview

Overview The delegate of a GKMatchmakerViewController object implements this protocol to handle when players accept invitations, the player cancels matchmaking, or an error occurs. In all these cases, except when a hosted player accepts a invitation, for example, matchmakerViewController(_:hostedPlayerDidAccept:), the delegate needs to dismiss the view controller.

## Topics

### Starting matches

- [matchmakerViewController(_:didFind:)](gamekit/gkmatchmakerviewcontrollerdelegate/matchmakerviewcontroller(_:didfind:).md)
- [matchmakerViewController(_:didFindHostedPlayers:)](gamekit/gkmatchmakerviewcontrollerdelegate/matchmakerviewcontroller(_:didfindhostedplayers:).md)

### Matching players using rules

- [matchmakerViewController(_:getMatchPropertiesForRecipient:withCompletionHandler:)](gamekit/gkmatchmakerviewcontrollerdelegate/matchmakerviewcontroller(_:getmatchpropertiesforrecipient:withcompletionhandler:).md)

### Handling cancellations and errors

- [matchmakerViewControllerWasCancelled(_:)](gamekit/gkmatchmakerviewcontrollerdelegate/matchmakerviewcontrollerwascancelled(_:).md)
- [matchmakerViewController(_:didFailWithError:)](gamekit/gkmatchmakerviewcontrollerdelegate/matchmakerviewcontroller(_:didfailwitherror:).md)

### Hosting matches

- [matchmakerViewController(_:hostedPlayerDidAccept:)](gamekit/gkmatchmakerviewcontrollerdelegate/matchmakerviewcontroller(_:hostedplayerdidaccept:).md)

### Deprecated Methods

- [matchmakerViewController(_:didFindPlayers:)](gamekit/gkmatchmakerviewcontrollerdelegate/matchmakerviewcontroller(_:didfindplayers:).md)
- [matchmakerViewController(_:didReceiveAcceptFromHostedPlayer:)](gamekit/gkmatchmakerviewcontrollerdelegate/matchmakerviewcontroller(_:didreceiveacceptfromhostedplayer:).md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Setting the delegate

- [matchmakerDelegate](gamekit/gkmatchmakerviewcontroller/matchmakerdelegate.md)
