---
title: "maxPlayersAllowedForMatch(of:)"
framework: gamekit
role: symbol
role_heading: Type Method
path: "gamekit/gkmatchrequest/maxplayersallowedformatch(of:)"
---

# maxPlayersAllowedForMatch(of:)

Returns the maximum number of players allowed in the match request for a given match type.

## Declaration

```swift
class func maxPlayersAllowedForMatch(of matchType: GKMatchType) -> Int
```

## Parameters

- `matchType`: The kind of match.

## Mentioned in

Finding multiple players for a game Starting turn-based matches and passing turns between players

## Return Value

Return Value The maximum number of allowed players.

## Discussion

Discussion For peer-to-peer, hosted, and turn-based matches, the maximum number of players is 16.

## See Also

### Restricting the number of players

- [GKMatchType](gamekit/gkmatchtype.md)
- [minPlayers](gamekit/gkmatchrequest/minplayers.md)
- [maxPlayers](gamekit/gkmatchrequest/maxplayers.md)
- [defaultNumberOfPlayers](gamekit/gkmatchrequest/defaultnumberofplayers.md)
