Instance Method

displayName(forPeer:)

Returns a user-readable name for a peer.

Declaration

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

Parameters

peerID

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.

Discussion

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.

Deprecated

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