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 throwsParameters
- 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:
errorDescribes an error if it occurs, or
nilif the operation completes.
Mentioned in
Discussion
Use this method to add more players to an existing match that doesn’t have enough players.