<!--
{
  "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/GKMatchmaker/findPlayers(forHostedRequest:withCompletionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKMatchmaker(im)findPlayersForHostedRequest:withCompletionHandler:"
  },
  "title" : "findPlayers(forHostedRequest:withCompletionHandler:)"
}
-->

# findPlayers(forHostedRequest:withCompletionHandler:)

Initiates a request to find players for a hosted match.

```
func findPlayers(forHostedRequest request: GKMatchRequest, withCompletionHandler completionHandler: (@Sendable ([GKPlayer]?, (any Error)?) -> Void)? = nil)
```

## Parameters

`request`

The configuration for the match.

`completionHandler`

The block that GameKit calls when it completes the request.

    This block receives the following parameters:

- `players`: The players that join the match. If unsuccessful, this parameter is `nil`.
- `error`: Describes an error if it occurs, or `nil` if the operation completes.

## Discussion

To find players using matchmaking rules, set the rules-related properties in `request` ([`queueName`](/documentation/GameKit/GKMatchRequest/queueName) and optionally, [`properties`](/documentation/GameKit/GKMatchRequest/properties)) before you call this method. To get the properties of all players who join the match, use the [`findMatchedPlayers(_:withCompletionHandler:)`](/documentation/GameKit/GKMatchmaker/findMatchedPlayers(_:withCompletionHandler:)) method instead. For more information, see [Matchmaking rules](/documentation/GameKit/matchmaking-rules).

---

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)