---
title: "anonymousGuestPlayer(withIdentifier:)"
framework: gamekit
role: symbol
role_heading: Type Method
path: "gamekit/gkplayer/anonymousguestplayer(withidentifier:)"
---

# anonymousGuestPlayer(withIdentifier:)

Creates a guest player with the specified identifier.

## Declaration

```swift
class func anonymousGuestPlayer(withIdentifier guestIdentifier: String) -> Self
```

## Parameters

- `guestIdentifier`: An identifier to use for the guest player.

## Return Value

Return Value A player object that represents the guest.

## Discussion

Discussion You can treat a guest player the same as an initialized player in regard to matchmaking services.

## See Also

### Creating a guest player

- [guestIdentifier](gamekit/gkplayer/guestidentifier.md)
