<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKGameActivity/findPlayersForHostedMatch(completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKGameActivity(im)findPlayersForHostedMatchWithCompletionHandler:"
  },
  "title" : "findPlayersForHostedMatch(completionHandler:)"
}
-->

# findPlayersForHostedMatch(completionHandler:)

Use information from the activity to find server hosted players for the local player.

```
func findPlayersForHostedMatch(completionHandler: @escaping @Sendable ([GKPlayer]?, (any Error)?) -> Void)
```

```
func findPlayersForHostedMatch() async throws -> [GKPlayer]
```

## Discussion

GameKit creates a classic server hosted match making request with the activity’s party code and other
information, and returns the players in the completion handler or any error that occurred.
An error occurs if this activity doesn’t support party code, or has unsupported range of players, which is
used to be configured as match request’s `minPlayers` and `maxPlayers`.

---

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)