Class

MCAdvertiserAssistant

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.

Declaration

@interface MCAdvertiserAssistant : NSObject

Overview

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

Topics

Initializing and Configuring

- initWithServiceType:discoveryInfo:session:

Initializes an advertiser assistant object.

session

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

delegate

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

discoveryInfo

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

serviceType

The service type that your app is advertising.

Starting and Stopping the Assistant

- start

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

- stop

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

Relationships

Inherits From