<!--
{
  "availability" : [
    "iOS: 6.0.0 - 8.0.0",
    "iPadOS: 6.0.0 - 8.0.0",
    "macCatalyst: 13.1.0 - 13.1.0",
    "macOS: 10.9.0 - 10.10.0",
    "visionOS: 1.0.0 - 1.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKMatch/chooseBestHostPlayer(completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKMatch(im)chooseBestHostPlayerWithCompletionHandler:"
  },
  "title" : "chooseBestHostPlayer(completionHandler:)"
}
-->

# chooseBestHostPlayer(completionHandler:)

Determines the best player in the game to act as the server for a client-server match.

```
func chooseBestHostPlayer(completionHandler: @escaping @Sendable (String?) -> Void)
```

## Parameters

`completionHandler`

The block that GameKit calls when it completes the request.

    The block receives the following parameter:

- `playerID`: The player identifier for the player with the best estimated network performance, or `nil` if GameKit couldn’t find a best host player.

## Discussion

Calling this method causes GameKit to attempt to estimate which player has the best overall network connection using a variety of metrics such as bandwidth, latency, and network reliability. Typically, you call this method when your game implements a client-server model on top of the match’s peer-to-peer connection.

---

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)