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. Action extensions are accessed by positioning the pointer over certain types of embedded content (such as an image in a document or attachment in an email) to reveal an action disclosure button, clicking a Share button in the toolbar, or choosing Share in a contextual menu. Action extensions can also be exposed as items within an app’s toolbar.
There are two types of Action extensions:
Viewer. Displays the current content in a custom way but doesn’t modify it.
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.
In the Share and contextual menus, only Action extensions that can work with the current content type are displayed. For example, Action extensions that support text aren’t shown when the current content is a video.
Tip A share extension is similar to an Action extension, but share information from the current context with apps, social media accounts, and other services. See Share Extensions.
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.
Don’t assume your Action extension is available. Users can enable and disable Action extensions in the Extensions system preference pane.
If appropriate, display an interface within the context of the host app. For example, the Markup action extension lets the user edit an image without leaving the primary app. Your interface 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. Only provide an interface when necessary.
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, you might 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 appropriate transparency and antialiasing, and don’t include a drop shadow. If your app offers multiple Action extensions, create a family of icons that share a common visual element that relates to your app’s icon.
For developer guidance, see App Extension Programming Guide.