Contents

acceptInvite(completionHandler:)

Accepts an invitation for the local player to join a turn-based match.

Declaration

func acceptInvite(completionHandler: (@Sendable (GKTurnBasedMatch?, (any Error)?) -> Void)? = nil)
func acceptInvite() async throws -> GKTurnBasedMatch

Parameters

  • completionHandler:

    The block that GameKit calls when it completes the request.

    The block receives the following parameters:

    match

    The match for the player to join, or nil if an error occurs.

    error

    Describes an error if it occurs, or nil if the operation completes.

Mentioned in

Discussion

When you provide a custom interface for managing matches, use this method to programmatically accept an invitation on behalf of the local player.

See Also

Creating a Match