---
title: playerID
framework: gamekit
role: symbol
role_heading: Instance Property
path: gamekit/gkplayer/playerid
---

# playerID

A unique identifier for a player of the game.

## Declaration

```swift
var playerID: String { get }
```

## Mentioned in

Protecting the player’s privacy using scoped identifiers

## Discussion

Discussion Never display the player identifier to the player. Use it only to identify a player in your code.

## See Also

### Identifying the player

- [gamePlayerID](gamekit/gkplayer/gameplayerid.md)
- [teamPlayerID](gamekit/gkplayer/teamplayerid.md)
- [scopedIDsArePersistent()](gamekit/gkplayer/scopedidsarepersistent().md)
- [GKPlayerIDNoLongerAvailable](gamekit/gkplayeridnolongeravailable.md)
