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 -> GKTurnBasedMatchParameters
- 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
nilif an error occurs.- error
Describes an error if it occurs, or
nilif 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.