---
title: "displayName(forPeer:)"
framework: gamekit
role: symbol
role_heading: Instance Method
path: "gamekit/gksession/displayname(forpeer:)"
---

# displayName(forPeer:)

Returns a user-readable name for a peer.

## Declaration

```swift
func displayName(forPeer peerID: String!) -> String!
```

## Parameters

- `peerID`: A string that uniquely identifies a peer.

## Return Value

Return Value The name for the peer, or nil if peerID is not associated with a visible peer.

## Discussion

Discussion The display name is used to populate your user interface with the names of other peers visible to the session.

## See Also

### Related Documentation

- [displayName](gamekit/gksession/displayname.md)

### Obtaining Information About Other Peers

- [peers(with:)](gamekit/gksession/peers(with:).md)
