---
title: "match(_:shouldReinvitePlayer:)"
framework: gamekit
role: symbol
role_heading: Instance Method
path: "gamekit/gkmatchdelegate/match(_:shouldreinviteplayer:)"
---

# match(_:shouldReinvitePlayer:)

Handles when a player disconnects from a two-player match.

## Declaration

```swift
optional func match(_ match: GKMatch, shouldReinvitePlayer playerID: String) -> Bool
```

## Parameters

- `match`: The match that lost the player.
- `playerID`: The identifier for the player whose connection failed.

## Return Value

Return Value Your game should return true if it wants GameKit to attempt to reconnect the player, false if it wants to terminate the match.

## Discussion

Discussion Occasionally, players may get disconnected from a match. If your game implements this method in the match delegate and the match only contains two players, GameKit calls this method after a player gets disconnected. If your delegate allows GameKit to reconnect to the other player, it reconnects the other player. Your match(_:player:didChange:) method is called when the other player is reconnected.

## See Also

### Deprecated Methods and Properties

- [match(_:player:didChange:)](gamekit/gkmatchdelegate/match(_:player:didchange:)-4eo7p.md)
- [match(_:didReceive:fromPlayer:)](gamekit/gkmatchdelegate/match(_:didreceive:fromplayer:).md)
