A block to be called when an invitation to join a match is accepted by the local player.
- iOS 4.1–7.0Deprecated
- macOS 10.8–10.10Deprecated
- Mac Catalyst 13.0–13.0Deprecated
The block takes the following parameters:
The invitation accepted by the player.
An array of
NSStringobjects containing player identifiers for additional players to invite into the game.
Your block should respond to the invitation in one of two ways:
Display the standard user interface by initializing a new
GKMatchmakerobject, passing the invitation object and the list of player identifiers as parameters.
Create a match programmatically by calling the
match(for:method on the shared matchmaker instance.
If your game receives an invitation while it is already running, it should transition to multiplayer play. It should clean up any existing content, such as ending the current match the player is playing, and then process the invitation.