Determines the best player in the game to act as the server for a client-server match.
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
A block to be called after the best player has been determined.
The block receives the following parameter:
GKPlayerobject that identifies the player with the best estimated network performance, or
nilif a player could not currently be determined.
Calling this method causes Game Kit 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. See Game Center Programming Guide.
When this method is called, it creates a new background task to handle the request. The method then returns control to your game. Later, when the task is complete, Game Kit calls your completion handler. The completion handler is always called on the main thread.