Contents

SLComposeServiceViewController

A view controller that you present from your share app extension, allowing the user to compose social media posts.

Declaration

class SLComposeServiceViewController

Overview

The SLComposeServiceViewController class provides a standard compose view, and you can present it for social sharing extensions on iOS and macOS. By default, the compose view includes items such as an editable text view and an indication of remaining characters, in addition to support for previewing attachments and displaying configuration items, such as an account or privacy picker.

The compose view controller gets items for the content and preview areas from the extensionContext property of the extension’s NSExtensionContext object.

Topics

Configuring the Post Details

Managing the Contents of the Post

Presenting the View Controller

Responding to Lifecycle Events

Canceling a Post

Validating Content

Previewing Attachments

Enabling Text Autocompletion

See Also

Composition Interfaces