Get Shortcut actions to show up in Shortuts

According to the 2021 WWDC video “Meet Shortcuts for macOS”, all I have to do is add the Intents file to my application, build it, and immediately the actions will be available in Shortcuts/Mac.

This is most definitely not my experience, I've added the Intents file, configured some intents, and build my application, but nothing shows up in Shortcuts. So clearly I am missing something.

My Application is an Objective C++ app, designed to run in the background (Keyboard Maestro Engine), and I'm trying to add some Shortcut actions to it, but I have had no luck getting them to appear at all.

Any suggestions on what to try or what more I need to do to get them to show up?

Make sure that the Intent Definition file is getting compiled into your app or extension target, since that file will need to exist in your app bundle for Shortcuts to discover the actions.

On macOS, multiple instances of your app can exist on-disk with the same bundle ID. This often happens when you have a production version of your app installed in /Applications, and a locally-built version for development. Shortcuts will only load actions from the app with the most recent build version in cases where there are multiple. It's possible that the app you're building with Xcode isn't taking priority, so the actions won't show up. Try incrementing your version number.

The Definition file is definitely getting compiled, the resultant files are showing up in my source, and by application can reference them in the build.

I definitely have lots of versions of the application on my harddisk, so this is definitely a possibility. I tried updating the version number to a later version, but it still is not showing up.

Is there any way to figure out which version of the application Shortcuts is looking at?

OK, I used mdfind kMDItemCFBundleIdentifier = "com.stairways.keyboardmaestro.engine" to find all the very many versions of my application on my harddisk, and deleted a bunch of them and that resolved the issue, so they are now showing up.

So thanks for the suggestion, that definitely helped!

I'm running into the same problem referencing that same WWDC video.

I have ensured that:

  • App intents file is included in the target
  • The intent is added to the Supported Intents section of the target/General tab
  • There's only one copy of my app on disk using the handy command Peter posted above. The only copy listed is the build in /Xcode/Derived-Data/...

The app builds and launches cleanly, and I see the intent code getting generated in the compiler log, but I still cannot find my shortcut in the shortcuts app.

This is a fresh AppKit-Swift MacOS app, not much else to consider in terms of complications.

Get Shortcut actions to show up in Shortuts
 
 
Q