---
title: "browser(_:foundPeer:withDiscoveryInfo:)"
framework: multipeerconnectivity
role: symbol
role_heading: Instance Method
path: "multipeerconnectivity/mcnearbyservicebrowserdelegate/browser(_:foundpeer:withdiscoveryinfo:)"
---

# browser(_:foundPeer:withDiscoveryInfo:)

Called when a nearby peer is found.

## Declaration

```swift
func browser(_ browser: MCNearbyServiceBrowser, foundPeer peerID: MCPeerID, withDiscoveryInfo info: [String : String]?)
```

## 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 doc://com.apple.multipeerconnectivity/documentation/MultipeerConnectivity/MCNearbyServiceAdvertiser/init(peer:discoveryInfo:serviceType:) in doc://com.apple.multipeerconnectivity/documentation/MultipeerConnectivity/MCNearbyServiceAdvertiser.

## Discussion

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:)](multipeerconnectivity/mcnearbyservicebrowserdelegate/browser(_:lostpeer:).md)
