iOS Guides | Samples

MultipeerConnectivity.MCAdvertiserAssistant Class

A convenience class that manages the process of advertising for multipeer connectivity and interacting with the application user.

See Also: MCAdvertiserAssistant


[Foundation.Register("MCAdvertiserAssistant", 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 MCAdvertiserAssistant : NSObject

See Also


Multipeer connectivity's discovery phase involves two roles: browsing and advertising. When an application makes itself available for connection, it is advertising. Advertising may be controlled by either a MCAdvertiserAssistant or can be fully customized with a MCNearbyServiceAdvertiser. 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.MCAdvertiserAssistant are listed below.

See Also: NSObject

Public Constructors

Default constructor, initializes a new instance of this class.
Creates an object for the specific serviceType and session.

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.
DelegateIMCAdvertiserAssistantDelegate. An instance of the MultipeerConnectivity.IMCAdvertiserAssistantDelegate model class which acts as the class delegate.
DiscoveryInfoNSDictionary. A small dictionary of data available to browsers.
ServiceTypeString. A string, between 1 and 15 characters long, identifying the network protocol being advertised.
SessionMCSession. The MCSession into which peers will be placed.
WeakDelegateNSObject. An object that can respond to the delegate protocol for this type

Public Methods

Begins advertising the local peer for connections.
Stops advertising the local peer.

Protected Methods

Releases the resources used by the MCAdvertiserAssistant object.