iOS Guides | Samples

MultipeerConnectivity.MCNearbyServiceBrowser Class

Allows programmatic browsing for devices advertising for multipeer connetivity.

See Also: MCNearbyServiceBrowser


[Foundation.Register("MCNearbyServiceBrowser", true)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.TvOS, 10, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 7, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 10, ObjCRuntime.PlatformArchitecture.Arch64, null)]
public class MCNearbyServiceBrowser : NSObject

See Also


Multipeer connectivity's discovery phase involves two roles: browsing and advertising. When an application searches for peers with which to connect, it is browsing. Browsing may be controlled by either a MCBrowserViewController or can be fully customized with a MCNearbyServiceBrowser. For a discussion of the discovery process, see the remarks for MCSession.

Related content


Namespace: MultipeerConnectivity
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions:

The members of MultipeerConnectivity.MCNearbyServiceBrowser are listed below.

See Also: NSObject

Public Constructors

Constructs a browser for the specified serviceType protocol, identifying the local peer as myPeerID.

Protected Constructors

Constructor to call on derived classes to skip initialization and merely allocate the object.
A constructor used when creating managed representations of unmanaged objects; Called by the runtime.

Public Properties

ClassHandleIntPtr. The handle for this class.
DelegateIMCNearbyServiceBrowserDelegate. An instance of the MultipeerConnectivity.IMCNearbyServiceBrowserDelegate model class which acts as the class delegate.
MyPeerIDMCPeerID. The identity of the local peer.
ServiceTypeString. The network protocol being browsed for.
WeakDelegateNSObject. An object that can respond to the delegate protocol for this type

Public Methods

InvitePeer(MCPeerID, MCSession, NSData, Double)
Invites a remote peer to join the session.
Starts browing for local peers advertising for the MCNearbyServiceBrowser.ServiceType.
Stops browsing for peers.

Protected Methods

Releases the resources used by the MCNearbyServiceBrowser object.