<!--
{
  "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/MCNearbyServiceBrowser",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Multipeer Connectivity"
    ],
    "preciseIdentifier" : "c:objc(cs)MCNearbyServiceBrowser"
  },
  "title" : "MCNearbyServiceBrowser"
}
-->

# MCNearbyServiceBrowser

Searches (by service type) for services offered by nearby devices using infrastructure Wi-Fi, peer-to-peer Wi-Fi, and Bluetooth (in iOS) or Ethernet (in macOS and tvOS), and provides the ability to easily invite those devices to a Multipeer Connectivity session (`MCSession`).

```
class MCNearbyServiceBrowser
```

## Topics

### Initializing the Browser

[`-  initWithPeer:serviceType:`](/documentation/MultipeerConnectivity/MCNearbyServiceBrowser/init(peer:serviceType:))

Initializes the nearby service browser object.

[`delegate`](/documentation/MultipeerConnectivity/MCNearbyServiceBrowser/delegate)

The delegate object that handles browser-related events.

[`myPeerID`](/documentation/MultipeerConnectivity/MCNearbyServiceBrowser/myPeerID)

The local peer ID for this instance.

[`serviceType`](/documentation/MultipeerConnectivity/MCNearbyServiceBrowser/serviceType)

The service type to browse for.

### Browsing for Peers

[`-  startBrowsingForPeers`](/documentation/MultipeerConnectivity/MCNearbyServiceBrowser/startBrowsingForPeers())

Starts browsing for peers.

[`-  stopBrowsingForPeers`](/documentation/MultipeerConnectivity/MCNearbyServiceBrowser/stopBrowsingForPeers())

Stops browsing for peers.

### Inviting Peers

[`-  invitePeer:toSession:withContext:timeout:`](/documentation/MultipeerConnectivity/MCNearbyServiceBrowser/invitePeer(_:to:withContext:timeout:))

Invites a discovered peer to join a Multipeer Connectivity session.

## Relationships

### Conforms To

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Equatable`](/documentation/Swift/Equatable)

[`CVarArg`](/documentation/Swift/CVarArg)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)