<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKMatchmakerViewControllerDelegate/matchmakerViewController(_:didFindHostedPlayers:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(pl)GKMatchmakerViewControllerDelegate(im)matchmakerViewController:didFindHostedPlayers:"
  },
  "title" : "matchmakerViewController(_:didFindHostedPlayers:)"
}
-->

# matchmakerViewController(_:didFindHostedPlayers:)

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

```
optional func matchmakerViewController(_ viewController: GKMatchmakerViewController, didFindHostedPlayers players: [GKPlayer])
```

## Parameters

`viewController`

The view controller that finds players for the match.

`players`

The players who accept an invitation to this match.

## Discussion

When all the players accept their invitations to a match, GameKit invokes this method in the app instances for all players in the game, including the local player who initiates the invitations. This method needs to dismiss the view controller and start the game. Your game needs to connect the players to your own server and then use that server to relay messages between the players.

Although this method appears optional in the protocol, if you set the view controller’s delegate for a hosted match, GameKit expects the delegate to implement this method. If the view controller’s [`isHosted`](/documentation/GameKit/GKMatchmakerViewController/isHosted) property is <doc://com.apple.documentation/documentation/Swift/false>, GameKit instead invokes the [`matchmakerViewController(_:didFind:)`](/documentation/GameKit/GKMatchmakerViewControllerDelegate/matchmakerViewController(_:didFind:)) method.

---

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)