A block to be called when a response from an invited player is returned to your game.
SDKs
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Game
Kit
Declaration
var recipientResponseHandler: ((GKPlayer, GKInvite Recipient Response) -> Void)? { get set }
Discussion
The block takes the following parameters:
- player
The
GKPlayer
object associated with the invited player.- GKInviteeRecipientResponse
The nature of the response. See
GKInvite
.Recipient Response
An invitee response handler is called whenever you programmatically invite specific players to join a match. It is called once for each player invited to the match. Typically, your game uses the responses to update the custom user interface. For example, you want the player to be able to perform any of the following tasks:
Start the match.
Invite an additional set of specific players.
Use matchmaking to fill the remaining match slots.