<!--
{
  "availability" : [
    "iOS: 17.2.0 -",
    "iPadOS: 17.2.0 -",
    "macCatalyst: 17.2.0 -",
    "macOS: 14.2.0 -",
    "tvOS: 17.2.0 -",
    "visionOS: 1.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKMatchmaker/findMatchedPlayers(_:withCompletionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKMatchmaker(im)findMatchedPlayers:withCompletionHandler:"
  },
  "title" : "findMatchedPlayers(_:withCompletionHandler:)"
}
-->

# findMatchedPlayers(_:withCompletionHandler:)

Initiates a request to find players for a hosted match that uses matchmaking rules.

```
func findMatchedPlayers(_ request: GKMatchRequest, withCompletionHandler completionHandler: @escaping @Sendable (GKMatchedPlayers?, (any Error)?) -> Void)
```

```
func findMatchedPlayers(_ request: GKMatchRequest) async throws -> GKMatchedPlayers
```

## Parameters

`request`

The configuration for the match.

`completionHandler`

The block that GameKit calls when it completes the request.

    This block receives the following parameters:

- `matchedPlayers`: The players that join the match, including their properties that matchmaking rules uses. 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. 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)