Professional Documents
Culture Documents
Part 10 - Workflow Tutorial PDF
Part 10 - Workflow Tutorial PDF
Extension
The Workflow Action Extension brings the power of running workflows out of
Workflow itself and into other apps, extending automation capabilities to any
app that has a share sheet.
With the Action Extension, you can run workflows that act on the content
you’re looking at inside another app. For example, you could set up
workflows to grab all the images from a page in Safari, convert a text file
you’re viewing to a PDF, or make edits and act on images in your Photos
library. The possibilities are endless.
In many apps, you’ll find a share button (like ) that presents a share sheet
when tapped. Inside the share sheet, two rows of activites are offered: Share
Extensions with colored app icons, and Action Extensions with grayscale
icons.
After the Workflow Action Extension has been enabled once, it will appear in
the bottom row of the share sheet in all of your apps.
In order to have your workflows show up in the Action Extension, they’ll need
to have the Action Extension type enabled.
Note
Workflows can be set to multiple types, so one workflow can work in both
the Action Extension and the Today Widget.
When creating a new workflow, you can quickly set the type of workflow you
want to build. Select ”Action Extension”, and you’ll see a small bar appear
above that says “This workflow accepts (Anything)”, which you can tap to set
the workflow‘s input types.
Pro Tip
It takes some testing to determine the type of input an app will offer. Some
apps share multiple types of input, like Photos, which shares both images and
media. And for other apps, the shared content is less obvious. For example, if
you’re in Twitter and you share a tweet that contains a photo, Twitter only
sends the URL of the tweet, not the tweet text or photo.
You can preview the Action Extension input by placing a View Content
Graph action at the beginning of your workflow.
See the full list of input types and their definitions in Understanding Action
Extension input types, so you can be aware of the specifics when building
Action Extension workflows.
Note
Similar to the Today Widget, the Action Extension has a limited amount of
memory (RAM) to work with. This means that some workflows that work
with large volumes of data may overload, and unfortunately crash, the
Action Extension. If this happens, you can workaround it by placing a
Continue in App action in your workflow, which will switch to the
Workflow app and finish running your workflow there where more
memory is available.
Now let’s move on to Using workflows from Apple Watch. Or, jump back to
Using workflows from the Today Widget.