Debugging updateAppShortcutParameters not adding shortcuts to Shortcuts App

So I'm developing an ios application which should be showing shortcuts, but its not. I'm not sure how to debug why the functionality isnt working.

Believe I'm correctly calling AppShortcutsProvider's updateAppShortcutParameters, but I dont see any errors in the console showing me a problem.

And in fact, I made a simplified just swift version that works before I tried to integrate it into a more complex project.

But now I'm at a loss as to what is going wrong or what debug tools I can use to figure it out. Any help would be appreciated.

When building my project I see:

025-08-18 14:07:49.371 appintentsmetadataprocessor[57506:35387547] Starting appintentsmetadataprocessor export 2025-08-18 14:07:49.414 appintentsmetadataprocessor[57506:35387547] Writing Metadata.appintents 2025-08-18 14:07:49.414 appintentsmetadataprocessor[57506:35387547] Metadata root: /Users/jpetersen/Library/Developer/Xcode/DerivedData/Unity-iPhone-dtnhxevagfkzsjdavesziaqrwisr/Build/Products/ReleaseForRunning-iphoneos/UnityFramework.framework/Metadata.appintents

AppIntentsSSUTraining (in target 'UnityFramework' from project 'Unity-iPhone') cd /Users/jpetersen/no_doc_repos/payments_ios_investigation/SpotlightSearch/client/Build /Applications/Xcode_16.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/appintentsnltrainingprocessor --infoplist-path /Users/jpetersen/Library/Developer/Xcode/DerivedData/Unity-iPhone-dtnhxevagfkzsjdavesziaqrwisr/Build/Products/ReleaseForRunning-iphoneos/UnityFramework.framework/Info.plist --temp-dir-path /Users/jpetersen/Library/Developer/Xcode/DerivedData/Unity-iPhone-dtnhxevagfkzsjdavesziaqrwisr/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/UnityFramework.build/ssu --bundle-id com.unity3d.framework --product-path /Users/jpetersen/Library/Developer/Xcode/DerivedData/Unity-iPhone-dtnhxevagfkzsjdavesziaqrwisr/Build/Products/ReleaseForRunning-iphoneos/UnityFramework.framework --extracted-metadata-path /Users/jpetersen/Library/Developer/Xcode/DerivedData/Unity-iPhone-dtnhxevagfkzsjdavesziaqrwisr/Build/Products/ReleaseForRunning-iphoneos/UnityFramework.framework/Metadata.appintents --archive-ssu-assets

2025-08-18 14:07:49.436 appintentsnltrainingprocessor[57507:35387550] Parsing options for appintentsnltrainingprocessor 2025-08-18 14:07:49.437 appintentsnltrainingprocessor[57507:35387550] Starting AppIntents SSU YAML Generation 2025-08-18 14:07:49.444 appintentsnltrainingprocessor[57507:35387550] Training 'Start ${+applicationName}' for English 2025-08-18 14:07:49.444 appintentsnltrainingprocessor[57507:35387550] Training 'Play ${ShortcutEntity}|Play ${ShortcutEntity} on ${+applicationName}' for English 2025-08-18 14:07:49.444 appintentsnltrainingprocessor[57507:35387550] Training Negative Phrases '' for English 2025-08-18 14:07:49.444 appintentsnltrainingprocessor[57507:35387550] Application name 'UnityFramework' for English 2025-08-18 14:07:49.449 appintentsnltrainingprocessor[57507:35387550] Generated AppIntents SSU YAML files in file:///Users/jpetersen/Library/Developer/Xcode/DerivedData/Unity-iPhone-dtnhxevagfkzsjdavesziaqrwisr/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/UnityFramework.build/ssu/ 2025-08-18 14:07:49.449 appintentsnltrainingprocessor[57507:35387550] Copied AppIntents SSU YAML files to file:///Users/jpetersen/Library/Developer/Xcode/DerivedData/Unity-iPhone-dtnhxevagfkzsjdavesziaqrwisr/Build/Products/ReleaseForRunning-iphoneos/UnityFramework.framework/Metadata.appintents/

So I think it should be making the required app intent data 🤷

Answered by DTS Engineer in 854849022

The key thing here is that you are placing the intents in a framework. There is one extra step required to set up an AppIntentsPackage so those intents in the framework are visible to the system.

— Ed Ford,  DTS Engineer

Ok, some information, but I'm still not sure what is going wrong.

In the console (but not in xcode which is annoying), I see:

Failed to refresh AppShortcut parameters with error: Error Domain=Foundation._GenericObjCError Code=0 "(null)"

So there must be something wrong with my shortcut, but this isnt a useful error. Maybe someone has an idea?

Accepted Answer

The key thing here is that you are placing the intents in a framework. There is one extra step required to set up an AppIntentsPackage so those intents in the framework are visible to the system.

— Ed Ford,  DTS Engineer

Can you provide additional documentation or an example of this being required?

The documentation I linked to above is the information — there isn't anything else I can cite, but it really is just the few lines of code that you'll find in that article.

That seemed to work, so I can see app entities in search and in shortcuts, but if the app is not running and I tap on them in the Shortcuts app, I get: "This current action is not allowed"

If you take your intent implementations into a new test project along with whatever other code you need to support those intent implementations, do you still get that behavior and log message? If so, I'd like to see a copy of that smaller test project to understand what's happening.

— Ed Ford,  DTS Engineer

Greetings, I did get this working, thanks Ed. I didnt fully understand that I needed 2 AppIntentsPackage, one in the framework and one in the main project.

This project used it and reading their code was helpful: https://github.com/ztzhang/locked_capture_example

Here is the one in the framework: https://github.com/ztzhang/locked_capture_example/blob/main/MyIntentFramework/AppIntentsPackage.swift

And here is the one in the main project, including that one in the framework: https://github.com/ztzhang/locked_capture_example/blob/main/AVCam/AppIntents.swift

And then a bonus one because they had an extension where they also had an intent: https://github.com/ztzhang/locked_capture_example/blob/main/ControlButtonExtension/AppIntents.swift

As for my other issue with "This current action is not allowed", I still havent been able to reproduce it in a smaller project unfortunately, there is seem to work, but its also a lot simpler. So I'm still looking for a solution for that.

Debugging updateAppShortcutParameters not adding shortcuts to Shortcuts App
 
 
Q