The MCAdvertiserAssistant is a convenience class that handles advertising, presents incoming invitations to the user, and handles users’ responses. Use this class to provide a user interface for handling invitations when your app does not require programmatic control over the invitation process.


class MCAdvertiserAssistant : NSObject


Before you can advertise a service, you must create an MCPeerID object that identifies your app and the user to nearby devices.


Initializing and Configuring

var session: MCSession

The session into which new peers are added after accepting an invitation.

var delegate: MCAdvertiserAssistantDelegate?

The delegate object that handles advertising-assistant-related events.

var discoveryInfo: [String : String]?

The info dictionary that was passed when this object was initialized.

var serviceType: String

The service type that your app is advertising.

Starting and Stopping the Assistant

func start()

Begins advertising the service provided by a local peer and starts the assistant.

func stop()

Stops advertising the service provided by a local peer and stops the assistant.


Inherits From

Conforms To