---
title: partyCode
framework: gamekit
role: symbol
role_heading: Instance Property
path: gamekit/gkgameactivity/partycode
---

# partyCode

If the game supports party code, this is the party code that can be shared among players to join the party.

## Declaration

```swift
var partyCode: String? { get }
```

## Mentioned in

Creating activities for your game

## Discussion

Discussion If the game doesn’t support party code, this value will be nil. Use start(definition:partyCode:) to create a game activity with a custom party code.

## See Also

### Getting and verifying the party code

- [partyURL](gamekit/gkgameactivity/partyurl.md)
- [validPartyCodeAlphabet](gamekit/gkgameactivity/validpartycodealphabet.md)
- [isValidPartyCode(_:)](gamekit/gkgameactivity/isvalidpartycode(_:).md)
