AppShortcuts are not showing up when using CustomIntentMigratedAppIntent with Xcode 14.1 beta 3.

I am using CustomIntentMigratedAppIntent shortcuts actions. When I want to show them in a SiriTipView, then it does not show up.

I get two messages in the console:

  1. "[Metadata] Couldn't read autoShortcutProviderMangledName key from metadata."
  2. "Provided AppIntent does not match an App Shortcut, SiriTipView will not display."

In the previous Xcode it worked well.

I'm having similar issues in 14.1 release. Have you found a fix?

I was having similar issues and finally resolved it. For me it came down to the typeDisplayRepresentation static var on all of my AppEntity structs.

I was declaring typeDisplayRepresentation as a computed var returning the typeDisplayName property.

I had to change typeDisplayRepresentation to be a stored property that was equal to the typeDisplayName property, or whatever relevant String.

EG: Broken:

static var typeDisplayRepresentation: TypeDisplayRepresentation {
    TypeDisplayRepresentation(name: typeDisplayName)
}
static var typeDisplayName: LocalizedStringResource = "Some Name"

Working:

static var typeDisplayRepresentation: TypeDisplayRepresentation = TypeDisplayRepresentation(name: typeDisplayName) 
OR
static var typeDisplayRepresentation: TypeDisplayRepresentation = TypeDisplayRepresentation(name: "Some Name")

Additionally if that isn't your particular problem you can check your build log details in Xcode. There’s an “App Intents Metadata Process” step towards the end that might have details in there.

For me searching for App Intents in the build log details revealed an error naming typeDisplayRepresentation

Thank you, ColtonJ! My AppIntents were no longer visible in the Shortcuts app and this solved my issue.

Another tip: If you use SwiftFormat in your project and write code like

static var typeDisplayRepresentation: TypeDisplayRepresentation = TypeDisplayRepresentation(name: "Some Name")

it will get reformatted to

static var typeDisplayRepresentation: TypeDisplayRepresentation = .init(name: "Some Name")

which breaks the metadata processor again. Therefore I recommend using the following syntax:

static var typeDisplayRepresentation = TypeDisplayRepresentation(name: "Some Name")

AppShortcuts are not showing up when using CustomIntentMigratedAppIntent with Xcode 14.1 beta 3.
 
 
Q