Instance Method

browser:foundPeer:withDiscoveryInfo:

Called when a nearby peer is found.

Required.

Declaration

- (void)browser:(MCNearbyServiceBrowser *)browser foundPeer:(MCPeerID *)peerID withDiscoveryInfo:(NSDictionary<NSString *,NSString *> *)info;

Parameters

browser

The browser object that found the nearby peer.

peerID

The unique ID of the peer that was found.

info

The info dictionary advertised by the discovered peer. For more information on the contents of this dictionary, see the documentation for initWithPeer:discoveryInfo:serviceType: in MCNearbyServiceAdvertiser.

Discussion

The peer ID provided to this delegate method can be used to invite the nearby peer to join a session.

See Also

Peer Discovery Delegate Methods

- browser:lostPeer:

Called when a nearby peer is lost.

Required.