---
title: "browser(_:lostPeer:)"
framework: multipeerconnectivity
role: symbol
role_heading: Instance Method
path: "multipeerconnectivity/mcnearbyservicebrowserdelegate/browser(_:lostpeer:)"
---

# browser(_:lostPeer:)

Called when a nearby peer is lost.

## Declaration

```swift
func browser(_ browser: MCNearbyServiceBrowser, lostPeer peerID: MCPeerID)
```

## Parameters

- `browser`: The browser object that lost the nearby peer.
- `peerID`: The unique ID of the nearby peer that was lost.

## Discussion

Discussion This callback informs your app that invitations can no longer be sent to a peer, and that your app should remove that peer from its user interface. important: Because there is a delay between when a host leaves a network and when the underlying Bonjour layer detects that it has left, the fact that your app has not yet received a disappearance callback does not guarantee that it can communicate with the peer successfully.

## See Also

### Peer Discovery Delegate Methods

- [browser(_:foundPeer:withDiscoveryInfo:)](multipeerconnectivity/mcnearbyservicebrowserdelegate/browser(_:foundpeer:withdiscoveryinfo:).md)
