<!--
{
  "availability" : [
    "iOS: 6.0.0 -",
    "iPadOS: 6.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKMatchRequest/maxPlayersAllowedForMatch(of:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKMatchRequest(cm)maxPlayersAllowedForMatchOfType:"
  },
  "title" : "maxPlayersAllowedForMatch(of:)"
}
-->

# maxPlayersAllowedForMatch(of:)

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

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

## Parameters

`matchType`

The kind of match.

## Return Value

The maximum number of allowed players.

## Discussion

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

---

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)