remove(completionHandler:)
Removes a match from Game Center that the local player participants in.
Declaration
func remove(completionHandler: (@Sendable ((any Error)?) -> Void)? = nil)func remove() async throwsParameters
- completionHandler:
The block that GameKit calls when it completes the request.
The block receives the following parameter:
- error
Describes an error if it occurs, or
nilif the operation completes.
Discussion
If you don’t use the GKTurnBasedMatchmakerViewController interface, where players can delete their matches, use this method to delete a match that the local player no longer actively participants in. This method only removes the match from the local player’s Game Center data — it doesn’t impact other participants in the match.