rematch(completionHandler:)
Creates a new match with the players from an existing match.
Declaration
func rematch(completionHandler: (@Sendable (GKMatch?, (any Error)?) -> Void)? = nil)func rematch() async throws -> GKMatchParameters
- completionHandler:
The block that GameKit calls when it completes the request.
The block receives the following parameters:
matchA new match, or
nilif an error occurs.errorDescribes an error if it occurs, or
nilif the operation completes.
Discussion
This method uses automatching to recreate a previous match. If you use this method to create a match, each instance of your game on each device should call this same method.