Action Extensions

An Action extension lets people initiate content-specific tasks, such as editing an inline image, adding a bookmark, or displaying selected text in another language, without leaving the current context. Typically, people access an Action extension by positioning the pointer over certain types of embedded content—for example, hovering over an image dragged into a Mail compose window reveals an action disclosure button. People may also access Action extensions in the menu revealed by the Share toolbar button or the extension's custom toolbar button.

Screenshot of a Mail compose window that contains a photo in the content area. A contextual menu is displayed on top of the photo, and lists the Markup Action extension and a More… item.

There are two types of Action extensions:

  • Viewer: Provides a custom way of viewing—but not modifying—the current content. An Action extension that displays a translation of selected text is an example of a viewer Action extension.

  • Editor: Enables editing of the current content. After edits are confirmed by the user, the extension replaces the original content with the edited version. The system-provided Markup extension is an example of an editor Action extension.

The system offers only the Action extensions that can work with the current content type. For example, Action extensions that support text aren’t shown when the current content is a video.

Expose a single, focused sharing task. An Action extension isn’t a mini-app. It performs a narrowly scoped task related to the current context. For example, the Markup extension lets people edit the selected image, but does not let them duplicate, rename, or move the image.

Don’t assume your Action extension is available. Users can enable and disable Action extensions in the Extensions system preference pane.

Screenshot of a photo within the editing panel of the Markup extension. The Mail compose window is shown beneath the panel.

Only provide an interface when necessary. For example, the Markup action extension lets the user add text to, draw on, or sign an image without leaving the app. The interface you provide should be recognizable and feel like a natural extension of your app.

Streamline and limit interaction. The best extensions let people perform a task in just a few steps.

Use a template image version of your app icon to represent your action extension icon. A template image uses a mask to create an icon. To create an Action extension icon, start by creating a stencil version of your app icon. If necessary, simplify the design by focusing on the elements that make your icon unique. Use transparency and antialiasing; don’t include a drop shadow. If your app offers multiple Action extensions, create a family of icons that share a common visual element related to your app’s icon.

For guidance, see Action in App Extension Programming Guide.