Protocol

GKMatchmakerViewControllerDelegate

A class implements the GKMatchmakerViewControllerDelegate protocol to receive notifications from a GKMatchmakerViewController object. The delegate is called if a new match has been successfully created, if the user cancels matchmaking, and if an error occurs. In all three cases, the delegate should dismiss the view controller.

Declaration

protocol GKMatchmakerViewControllerDelegate

Topics

Handling Cancellations

func matchmakerViewControllerWasCancelled(GKMatchmakerViewController)

Called when the user cancels the matchmaking request

Required.

Handling Errors

func matchmakerViewController(GKMatchmakerViewController, didFailWithError: Error)

Called when the view controller encounters an unrecoverable error.

Required.

Hosted Matches

func matchmakerViewController(GKMatchmakerViewController, hostedPlayerDidAccept: GKPlayer)

Called when a player in a hosted match accepts the invitation.

Deprecated Methods

Relationships

Inherits From

See Also

Getting and Setting the Delegate

var matchmakerDelegate: GKMatchmakerViewControllerDelegate?

The delegate for the matchmaker view controller.