<!--
{
  "availability" : [
    "iOS: 7.0.0 - 27.0.0",
    "iPadOS: 7.0.0 - 27.0.0",
    "macCatalyst: 13.1.0 - 27.0.0",
    "macOS: 10.10.0 - 27.0.0",
    "tvOS: 10.0.0 - 27.0.0",
    "visionOS: 1.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "MultipeerConnectivity",
  "identifier" : "/documentation/MultipeerConnectivity/MCBrowserViewControllerDelegate/browserViewController(_:shouldPresentNearbyPeer:withDiscoveryInfo:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Multipeer Connectivity"
    ],
    "preciseIdentifier" : "c:objc(pl)MCBrowserViewControllerDelegate(im)browserViewController:shouldPresentNearbyPeer:withDiscoveryInfo:"
  },
  "title" : "browserViewController(_:shouldPresentNearbyPeer:withDiscoveryInfo:)"
}
-->

# browserViewController(_:shouldPresentNearbyPeer:withDiscoveryInfo:)

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

```
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 [`init(peer:discoveryInfo:serviceType:)`](/documentation/MultipeerConnectivity/MCNearbyServiceAdvertiser/init(peer:discoveryInfo:serviceType:)) in [`MCNearbyServiceAdvertiser`](/documentation/MultipeerConnectivity/MCNearbyServiceAdvertiser).

## Return Value

This delegate method should return <doc://com.apple.documentation/documentation/Swift/true> if the newly discovered peer should be shown in the user interface, or <doc://com.apple.documentation/documentation/Swift/false> otherwise.

## Discussion

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)