Contents

addPlayers(to:matchRequest:completionHandler:)

Invites additional players to an existing match.

Declaration

func addPlayers(to match: GKMatch, matchRequest: GKMatchRequest, completionHandler: (@Sendable ((any Error)?) -> Void)? = nil)
func addPlayers(to match: GKMatch, matchRequest: GKMatchRequest) async throws

Parameters

  • match:

    The match to which GameKit adds the players.

  • matchRequest:

    The configuration for the match.

  • completionHandler:

    The block that GameKit calls when it completes the request.

    This block receives the following parameters:

    error

    Describes an error if it occurs, or nil if the operation completes.

Mentioned in

Discussion

Use this method to add more players to an existing match that doesn’t have enough players.

See Also

Matching players