Hello.
I want to provide my users with some useful shortcuts and chose AppIntents
to do so. I watched the relevant WWDC talks, read the documentation and I set up a few simple intents, adhering to AppIntent
. I also created a AppShortcutsProvider
to offer the most useful of my intents on installation. I did use \(.applicationName)
within my phrases.
Trying it out on the simulator, it works as intended (Ventura 13.3, Xcode 14.3, iOS 16.4). Wonderful! Now, building the same code for my hardware device (iPhone SE 3rd Gen, iOS 16.4) and trying it out on there, nothing shows up - neither the intents I want to add on install, nor the ones the user would have to select manually. I really have no idea why...
On a side note: My app does have a Watch counterpart and I'd like to do the same there, but with intents specific to the Watch app. They don't even show up in the simulator, though.
Any ideas what could've went wrong here? I'd appreciate it.
Thanks!
I figured it out. Just wish I had looked into the build log in the first place... I guess it didn't have much to do the with Watch target, just the code I copy pasted. Anyways, it seems appintentsmetadataprocessor
failed because of a custom type I had created.
2023-04-12 17:07:44.429 appintentsmetadataprocessor[74428:4172175] warning: At least one halting error produced during export. No AppIntents metadata have been exported and this target is not usable with AppIntents until errors are resolved.
2023-04-12 17:07:44.429 appintentsmetadataprocessor[74428:4172175] warning: 'typeDisplayRepresentation' must directly instantiate a 'TypeDisplayRepresentation'
This works:
static var typeDisplayRepresentation = TypeDisplayRepresentation(name: "Prüfung")
This doesn't:
static var typeDisplayRepresentation : TypeDisplayRepresentation = .init(name: "Prüfung")
Yeah