<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.8.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKMatchmakerViewControllerDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(pl)GKMatchmakerViewControllerDelegate"
  },
  "title" : "GKMatchmakerViewControllerDelegate"
}
-->

# GKMatchmakerViewControllerDelegate

An object that handles when the status of matchmaking changes.

```
protocol GKMatchmakerViewControllerDelegate : NSObjectProtocol
```

## Overview

The delegate of a [`GKMatchmakerViewController`](/documentation/GameKit/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:)`](/documentation/GameKit/GKMatchmakerViewControllerDelegate/matchmakerViewController(_:hostedPlayerDidAccept:)), the delegate needs to dismiss the view controller.

## Topics

### Starting matches

[`matchmakerViewController(_:didFind:)`](/documentation/GameKit/GKMatchmakerViewControllerDelegate/matchmakerViewController(_:didFind:))

Handles when the view controller finds players for a peer-to-peer match.

[`matchmakerViewController(_:didFindHostedPlayers:)`](/documentation/GameKit/GKMatchmakerViewControllerDelegate/matchmakerViewController(_:didFindHostedPlayers:))

Handles when the view controller finds all requested players for a hosted match.

### Matching players using rules

[`matchmakerViewController(_:getMatchPropertiesForRecipient:withCompletionHandler:)`](/documentation/GameKit/GKMatchmakerViewControllerDelegate/matchmakerViewController(_:getMatchPropertiesForRecipient:withCompletionHandler:))

Returns the properties for another player that the local player invites using the view controller interface.

### Handling cancellations and errors

[`matchmakerViewControllerWasCancelled(_:)`](/documentation/GameKit/GKMatchmakerViewControllerDelegate/matchmakerViewControllerWasCancelled(_:))

Handles when a player cancels a request to find players for a match.

[`matchmakerViewController(_:didFailWithError:)`](/documentation/GameKit/GKMatchmakerViewControllerDelegate/matchmakerViewController(_:didFailWithError:))

Handles when a view controller encounters an error while finding players for a match.

### Hosting matches

[`matchmakerViewController(_:hostedPlayerDidAccept:)`](/documentation/GameKit/GKMatchmakerViewControllerDelegate/matchmakerViewController(_:hostedPlayerDidAccept:))

Handles when a player in a hosted match accepts the invitation.

### Deprecated Methods

[`matchmakerViewController(_:didFindPlayers:)`](/documentation/GameKit/GKMatchmakerViewControllerDelegate/matchmakerViewController(_:didFindPlayers:))

Called when a hosted match is found.

[`matchmakerViewController(_:didReceiveAcceptFromHostedPlayer:)`](/documentation/GameKit/GKMatchmakerViewControllerDelegate/matchmakerViewController(_:didReceiveAcceptFromHostedPlayer:))

Called when a player in a hosted match accepts the invitation.



---

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)