Instance Method

peers(with:)

Returns a list of peers in the specified connection state.

Declaration

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

Parameters

state

The connection state to search for. See GKPeerConnectionState for possible values.

Return Value

An array of NSString objects with a peerID string for each peer visible to the session that is currently in the specified connection state. If there are no peers in the specified connection state, this method returns nil.

See Also

Obtaining Information About Other Peers

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

Returns a user-readable name for a peer.

Deprecated