<!--
{
  "availability" : [
    "iOS: 5.0.0 - 7.0.0",
    "iPadOS: 5.0.0 - 7.0.0",
    "macOS: 10.8.0 - 10.10.0",
    "visionOS: 1.0.0 - 1.0.0",
    "watchOS: 3.0.0 - 3.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKTurnBasedEventHandlerDelegate/handleInvite(fromGameCenter:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(pl)GKTurnBasedEventHandlerDelegate(im)handleInviteFromGameCenter:"
  },
  "title" : "handleInvite(fromGameCenter:)"
}
-->

# handleInvite(fromGameCenter:)

Sent to the delegate when the local player receives an invitation to join a new turn-based match.

```
func handleInvite(fromGameCenter playersToInvite: [String])
```

## Parameters

`playersToInvite`

An array of `NSString` objects containing the player identifiers for the players to initially invite to the game.

## Discussion

When your delegate receives this message, your game should create a new [`GKMatchRequest`](/documentation/GameKit/GKMatchRequest) object and assign the `playersToInvite` parameter to the match request’s [`playersToInvite`](/documentation/GameKit/GKMatchRequest/playersToInvite) property. Then, your game can either call the [`GKTurnBasedMatch`](/documentation/GameKit/GKTurnBasedMatch) class method [`find(for:withCompletionHandler:)`](/documentation/GameKit/GKTurnBasedMatch/find(for:withCompletionHandler:)) to find a match programmatically or it can use the request to instantiate a new [`GKTurnBasedMatchmakerViewController`](/documentation/GameKit/GKTurnBasedMatchmakerViewController) object to show a user interface to the 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)