Contents

findPlayersForHostedMatch(completionHandler:)

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

Declaration

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

Mentioned in

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.

See Also

Performing a matchmaking request