Instance Method


Returns a user-readable name for a peer.


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



A string that uniquely identifies a peer.

Return Value

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


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

See Also

Obtaining Information About Other Peers

func peers(with: GKPeerConnectionState) -> [Any]!

Returns a list of peers in the specified connection state.


Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software