App Shortcuts Preview: No Matching Intent?

Hi!

In neither Xcode 16.2 beta 3 nor Xcode 16.2 I am able to get App Shortcuts Preview to recognise my Shortcuts. In either supported language I always get "No Matching Intent" as the result.

Flexible matching is enabled, minimum deployment target is iOS 18. The Shortcut phrases do work in the simulator and on device.

Is this a known issue or am I missing something?

What happens if you add a new string catalog named AppShortcuts.xcstrings to your project?

—Ed Ford,  DTS Engineer

Thanks for looking into this. I do have AppShortcuts.xcstrings in my project already (project default language is English, localization for German).

The phrases do work in the simulator and on device in both languages, but I still get "No Matching Intent" in the latest Xcode Version 16.2 (16C5032a) when trying to use App Shortcuts Preview.

I do have a localized app name (which seems to cause an issue in SiriTipView), so maybe this is related?

Do you get the same results with just the relevant code in a small test project? If so, please share a link to your test project. That'll help us better understand what's going on. If you're not familiar with preparing a test project, take a look at Creating a test project.

—Ed Ford,  DTS Engineer

Hi Ed @DTS Engineer, I'm encountering the same issue. Even in the Trails Sample App from WWDC.

If you build and run this project, the App Shortcuts are recognized in an iOS simulator and on a device. But in Xcode's App Shortcuts Preview tool, every utterance seems to return No Matching Intent, even when entering verbatim ones defined in the App Shortcut's phrases array.

FB16432161

I can confirm what you're seeing there @bondad. I appreciate you filing FB16432161 for us to take a look.

—Ed Ford,  DTS Engineer

Hi @DTS Engineer – I just received a response to FB16432161 that the App Shortcuts Preview tool has been fixed. I tested the Trails Sample App again in the latest Xcode, Version 16.3 (16E140).

Entering an exact utterance from the App Shortcut's phrases array does now match to the expected App Intent, so we're making progress! However, using any variation from these predefined phrases still results in No Matching Intent.

In the build settings for this project, Enable App Shortcuts Flexible Matching is set to Yes. (build settings reference)

With this build setting enabled, I would expect both of these utterances to match successfully to the same intent.

AppShortcut(
  intent: OpenFavorites(),
  phrases: [
    "Open Favorites in \(.applicationName)",
    "Show my favorite \(.applicationName)"
  ],
  shortTitle: "Open Favorites",
  systemImageName: "star.circle"
)

From Spotlight your app with App Shortcuts (WWDC23):

In iOS 17, we're giving you the ability to speak more naturally to trigger your App Shortcuts. This takes advantage of on-device machine learning to allow phrases similar to the ones you've provided in your App Shortcut to also just work. This is powered by a new Semantic Similarity Index. With this new flexible matching feature, people can use more natural ways of invoking app shortcuts, and you don't have to provide every possible different phrasing.

@bondad, I'm glad you saw the response to FB16432161 and that you're able to see the App Shortcuts Preview tool working for you, at least partially.

Your request here for the slight alteration in phrasing to be matched to the intent is reasonable based on flexible matching. I'd like to treat this as a separate matter we need to investigate, different than FB16432161 since the underlying problem there is fixed, so would you mind opening a new report to focus on this for the flexible matching?

— Ed Ford,  DTS Engineer

Thanks @DTS Engineer – I've filed a fresh feedback specific to the flexible matching issue. FB17433375

App Shortcuts Preview: No Matching Intent?
 
 
Q