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

Syntax

[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

Remarks

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

Requirements

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

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

[read-only]
override
ClassHandleIntPtr. The handle for this class.
DelegateIMCAdvertiserAssistantDelegate. An instance of the MultipeerConnectivity.IMCAdvertiserAssistantDelegate model class which acts as the class delegate.
[read-only]
DiscoveryInfoNSDictionary. A small dictionary of data available to browsers.
[read-only]
ServiceTypeString. A string, between 1 and 15 characters long, identifying the network protocol being advertised.
[read-only]
SessionMCSession. The MCSession into which peers will be placed.
WeakDelegateNSObject. An object that can respond to the delegate protocol for this type

Public Methods

Start()
Begins advertising the local peer for connections.
Stop()
Stops advertising the local peer.

Protected Methods

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