<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.8.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKTurnBasedMatch/acceptInvite(completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKTurnBasedMatch(im)acceptInviteWithCompletionHandler:"
  },
  "title" : "acceptInvite(completionHandler:)"
}
-->

# acceptInvite(completionHandler:)

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

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

## 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.

## Discussion

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)