iOS Guides | Samples

MultipeerConnectivity.MCBrowserViewController Class

A standard UIViewController that provides a user experience for browsing for peers.

See Also: MCBrowserViewController

Syntax

[Foundation.Register("MCBrowserViewController", true)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.TvOS, 10, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 7, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public class MCBrowserViewController : UIViewController, IMCNearbyServiceBrowserDelegate, IDisposable

See Also

Remarks

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

Requirements

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

The members of MultipeerConnectivity.MCBrowserViewController are listed below.

See Also: UIViewController

Public Constructors

A constructor that initializes the object from the data stored in the unarchiver object.
Constructor where the service type and options are defined in browser.
Creates a new multipeer browser view controller from the named NIB in the specified bundle.
Constructor that advertises the serviceType network protocol.

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

[read-only]
BrowserMCNearbyServiceBrowser. The MCNearbyServiceBrowser used for discovering peers.
[read-only]
override
ClassHandleIntPtr. The handle for this class.
DelegateIMCBrowserViewControllerDelegate. An instance of the MultipeerConnectivity.IMCBrowserViewControllerDelegate model class which acts as the class delegate.
MaximumNumberOfPeersnuint. Allows the application developer to limit the number of peers.
MinimumNumberOfPeersnuint. Allows the application developer to specify a minimum amount of peers.
[read-only]
SessionMCSession. The MCSession being managed.
WeakDelegateNSObject. An object that can respond to the delegate protocol for this type

Public Methods

DidNotStartBrowsingForPeers(MCNearbyServiceBrowser, NSError)
Method that is called when the browser failed to start looking for peers.
FoundPeer(MCNearbyServiceBrowser, MCPeerID, NSDictionary)
Method that is called when a peer is found.
LostPeer(MCNearbyServiceBrowser, MCPeerID)
Method that is called when a peer is lost.

Protected Methods

override
Dispose(Boolean)
Releases the resources used by the MCBrowserViewController object.