AppIntents don't show up in Shortcuts app when in SPM package

Hi there,

I successfully created an AppIntent for our app, and when I had it in the same target as our main app it showed up fine in the shortcuts app.

Then I realized that many of the new System Control widgets introduced in iOS 18 (e.g. lockscreen, control center) live in the widget extension target, but they also need to reference that same AppIntent. So to fix this, I thought I'd migrate out the code into it's own SPM package that both the WidgetExtension and the Main App processes can reference. However, after doing that and rebuilding, the intent no longer shows up in the Shortcuts app. Furthermore, my AppShortcutsProvider class now has this error when trying to define the list of appShortcuts:

App Intent <name> should be in the same target as AppShortcutsProvider

Is this intended, and if so, how do we reference the same AppIntent across multiple targets?

AppIntents don't show up in Shortcuts app when in SPM package
 
 
Q