Instance Method


Returns a list of peers in the specified connection state.


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



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.


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