---
title: "browserViewController(_:shouldPresentNearbyPeer:withDiscoveryInfo:)"
framework: multipeerconnectivity
role: symbol
role_heading: Instance Method
path: "multipeerconnectivity/mcbrowserviewcontrollerdelegate/browserviewcontroller(_:shouldpresentnearbypeer:withdiscoveryinfo:)"
---

# browserViewController(_:shouldPresentNearbyPeer:withDiscoveryInfo:)

Called when a new peer is discovered to decide whether to show it in the user interface.

## Declaration

```swift
optional func browserViewController(_ browserViewController: MCBrowserViewController, shouldPresentNearbyPeer peerID: MCPeerID, withDiscoveryInfo info: [String : String]?) -> Bool
```

## Parameters

- `browserViewController`: The browser view controller object that discovered the new peer.
- `peerID`: The unique ID of the nearby peer.
- `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.

## Return Value

Return Value This delegate method should return true if the newly discovered peer should be shown in the user interface, or false otherwise.

## Discussion

Discussion If this method is not provided, all peers are shown.
