Instance Method


Create a new match with the list of players from an existing match.


func rematch(completionHandler: ((GKMatch?, Error?) -> Void)? = nil)



A block to be called after the match is created.

The block receives the following parameter:


The new match. If an error occurred, this parameter’s value is nil.


If an error occurred, this parameter holds an error object that describes the problem. If the match was successfully recreated, this parameter’s value is nil.


Calling this method uses auto-matching to recreate a previous match. A new match with the same set of players is created and returned. If your game attempts to recreate matches using this method, each instance of your game on each device should call this method.

When this method is called, it creates a new background task to handle the request. The method then returns control to your game. Later, when the task is complete, Game Kit calls your completion handler. The completion handler is always called on the main thread.

See Also

Finishing the Match

func disconnect()

Disconnects the local player from the match.