A protocol that handles invite events from Game Center.


protocol GKInviteEventListener


You can invite other players and start your game from directly from Game Center. Accepting an invitation begins the game from Game Center with the accepting player assigned a spot in the game.

Do not implement GKInviteEventListener directly, instead use GKLocalPlayerListener. The GKLocalPlayerListener protocol inherits methods from GKInviteEventListener, GKChallengeListener, GKSavedGameListener, and GKTurnBasedEventListener in order to handle multiple events.


Starting a New Match

func player(GKPlayer, didAccept: GKInvite)

Called when another player accepts a match invite from the local player.

func player(GKPlayer, didRequestMatchWithRecipients: [GKPlayer])

Called when the local player starts a match with another player from Game Center.

func player(GKPlayer, didRequestMatchWithPlayers: [String])

Called when the local player starts a match with another player from Game Center.



See Also


class GKLocalPlayer

An object representing the authenticated Game Center player on a device.

class GKPlayer

An object that provides information about a player on Game Center.

class GKBasePlayer

The top-level player object containing basic identifying information for a player.

protocol GKLocalPlayerListener

A protocol that handles events for Game Center accounts.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software