In the previous blog post, why and how I created an updated version of Xcode 10's Automator action template was outlined. This post will cover using the template in Xcode 14.3+ to create an Automator action and integrate it into a host app.
First, download the updated template from its project page on GitHub (if you haven't read the preceding blog post, the short version of why this is necessary is because Apple stopped including it in Xcode at some point, so to create Automator actions in newer versions of Xcode the template must be procured elsewhere). Unzip the template and copy it to ~/Library/Developer/Xcode/Templates/Project Templates/Mac/Other
, creating any missing folders along the way.
Restart Xcode if it's open, then depending on your needs do one of the following:
From there, select "macOS" in the sheet, scroll down to the "Other" section and select "Automator Action". Configure the action to your needs and click "Finish".
You should now have a blank Automator action and can start writing code.
A few oddities to note:
Info.plist
fields shown in the General tab of the action's project page (action name, primary application, summary, etc) will be ignored by Automator if the InfoPlist.strings
internationalization file that's created by default is present. If you only plan to support a single language, delete InfoPlist.strings
and Automator will fall back on the information in Info.plist
.${CONTENTS_FOLDER_PATH}/Library/Automator
. This will copy the action into the host app's bundle under /Contents/Library/Automator
.