App Intents

RSS for tag

Explore the App Intents framework, including how to expose your app's actions and content to Siri, Shortcuts, Spotlight, and other system experiences.

Documentation

Posts under App Intents subtopic

Post

Replies

Boosts

Views

Activity

App Intents Phone Schema Domain - .phone.startCall does not invoke perform()
We're implementing the App Intents Phone schema domain in our app to enable Siri to initiate calls to our contact entities via our voip. We've implemented a .phone.startCall intent and registered our entities as .phone.phonePerson. The intent provides both the required destination and audioVisualMode parameters, and the perform() method is implemented to handle the call. However, the perform() method is never invoked. Instead, Siri either: Says that the phone number is not linked, or Announces that it is calling, but our app intent is never executed. Anybody implemented this Phone schema domain and it s working successfully ? Sample Code: struct StartCallIntent: AudioRecordingIntent, AudioPlaybackIntent { var destination: CallDestination var audioVisualMode: CallAVMode init(contact: ContactEntity, mode: CallAVMode = .audio) { self.destination = .phonePerson(contact) self.audioVisualMode = mode } func perform() async throws -> some IntentResult { print("Call Initiating to contact") return .result() } @AppEnum(schema: .phone.audioVisualMode) enum CallAVMode: String, CaseIterable { case audio case video } @UnionValue enum CallDestination: Sendable { case phonePerson(ContactEntity) case group([ContactEntity]) } @AppEntity(schema: .phone.phonePerson) struct ContactEntity: IndexedEntity { static var defaultQuery = ContactEntityQuery() let id: UUID var person: IntentPerson }
3
0
712
3d
Supporting iOS 27 app entity schemas and maintaining backwards compatability
We have an app that supports iOS 18+ We have a couple of AppEntity(s) that we are keen to make work with the new schemas along with several AppIntent(s). We cannot increase our floor to iOS 27 for obvious reasons. All the documentation suggests using the macros, e.g. @AppEntity(schema: .audio.song) struct SongEntity { ... } This refuses to compile below iOS 26. It's possible to add availability checks, e.g. @available(anyAppleOS 27, *) @AppEntity(schema: .audio.song) struct SongEntity { ... } But then the whole entity becomes unavailable on pre-27 OSes. So I tried moving the macro onto an extension, e.g. struct SongEntity { ... } @available(anyAppleOS 27, *) @AppEntity(schema: .audio.song) extension SongEntity { ... } But this results in a compiler error: 'extension' macro cannot be attached to extension (extension of 'SongEntity') One other option is to create a new entity with a totally different name and mark it as isAssistantOnly but this has a lot of quite negative downstream effects that make it unworkable. For example: a lot of code duplication duplication in search indexes if we index both sets of entities awkwardness trying to use NSUserActivity when we have 2 different entity types pain in downstream AppIntent arguments which would require duplicating every AppIntent which has more cascading effects The same issues are present in AppIntent schemas too where even trying to add the most basic @AppIntent(schema: .system.open) to our existing OpenIntent doesn't seem possible for all the same reasons. I am really struggling with how to structure code so we can support schemas, currently I don't really see a path forward here until our floor raises to iOS 27. Is there a way to make this work nicely with the current APIs? What are others doing here? How can apps can ship in September and support both this and pre iOS 27 cleanly? Thinking about solutions here, my ideal would be that the macros are improved to either: be able to be applied to an extension rather than the structure itself. expand in such a way that they still build the core AppEntity / AppIntent on pre 27 OSes but then add the iOS 27 schema additions behind @available internally so they can be used with older targets as essentially no-ops on the current definitions.
3
1
978
1w
Supporting legacy INAddTasksIntent and the new .reminders.createReminder App Intent schema
We have a list app that implements INAddTasksIntent so users can add items to our app with Siri. We're now working on implementing an App Intent for the .reminders.createReminder schema for iOS 27. Our app still supports iOS 18, so it implements both INAddTasksIntent and the .reminders.createReminder schema. Observed behavior (iOS 27 beta 4): When we say "Siri, add eggs to my grocery list in AppName", Siri routes the request to the legacy INAddTasksIntent handler in our SiriKit extension. Our new CreateReminderIntent is never invoked. I confirmed this with breakpoints and logging in both handlers. The CreateReminderIntent does seem to be set up correctly, because it appears in the Shortcuts app and I can invoke it via AppIntentsTesting. Also, after using the above phrase, I was able to say "Siri, add cookies to my grocery list" and the item got added to my app via the INAddTasksIntent, even though I didn't specify the app name in the request. This also worked with a version of our app that does not contain CreateReminderIntent running on iOS 26.5. Isn't the app name normally required for INAddTasksIntent to be invoked? Questions: Is Siri activating the INAddTasksIntent instead of the new CreateReminderIntent expected behavior? Are users on iOS 27 going to have a worse experience adding items to our app with Siri if we support both INAddTasksIntent and the new CreateReminderIntent? If so, how do you recommend we proceed? Thank you for any guidance you can provide.
2
0
143
1w
Hiding unsupported parameters of a schema-conforming intent from Shortcuts
I've adopted the .reminders.createReminder schema so users can create reminders in my app via Siri and Apple Intelligence. My app only supports a subset of the schema (title, list, and note), but the macro requires me to declare all the other parameters (e.g. isFlagged, tags), so I declare them and ignore them in perform(). The problem: in the Shortcuts app, every declared parameter shows up as an editable field, so it looks like my app supports flags, tags, etc when it doesn't, and the values are silently ignored if the user sets them. Is there a supported way to keep parameters my app can't fulfill from appearing in Shortcuts while still conforming to the schema? The best workaround I've found is to mark the schema intent isAssistantOnly = true (which hides it from Shortcuts while keeping it available to Siri/Apple Intelligence), and then use AppShortcutsProvider to provide a separate non-schema AppIntent that exposes just title/list/note to Shortcuts. However, the docs describe isAssistantOnly as a migration aid that's only intended to be enabled temporarily while migrating an existing intent to an app schema intent. Questions: Is that a supported use of the isAssistantOnly property? Is there a way to mark individual parameters as unsupported so they do not appear in Shortcuts? Is there another recommended approach when an app can only fulfill part of a schema? Thank you!
0
0
133
1w
Use ShowInAppSearchResultsIntent with custom Parameters
I’m currently using ShowInAppSearchResultsIntent to open the app in a selectable view with the search results. The user can choose which view to pick via a @Parameter. Though with iOS 27 I can’t compile this intent anymore, because of this error: 'ShowInAppSearchResultsIntent' must only have a 'criteria' parameter What is the best practice to offer the same selection of the search view with iOS 27 and newer then? My Code import AppIntents @AppIntent(schema: .system.search) struct SearchAppIntent: ShowInAppSearchResultsIntent { static let searchScopes: [StringSearchScope] = [.general] var criteria: StringSearchCriteria // MARK: Parameters @Parameter(default: .loans) var target: SearchView? // MARK: Action Text static var parameterSummary: some ParameterSummary { Summary("Search \(\.$criteria) in \(\.$target)", table: "Shortcuts") } // MARK: Action @MainActor func perform() async throws -> some IntentResult { switch target { case .general, nil: // Open app search tab NavigationManager.shared.openAppSearch(with: criteria.term) case .contacts: // Open contacts tab NavigationManager.shared.openContactsSearch(with: criteria.term) } return .result() } }
4
0
341
2w
Guidance Needed on App Entities, Intents, and the New Siri
I'm trying to get some clarity on how the new Siri deals with IndexedEntities and whether it's worth adopting, considering our app does not fit into any of the predefined domain schemas. In running some tests with the TravelTracking sample app, it seems the only way I can get Siri to show any of the referenced entities is by using the exact phrasing (or extremely close to it) in one of the donated shortcuts. If I ask Siri to "Find closest landmark in TravelTracking" produces a result from the App in the form of an app snippet. But, if I then ask it "Text the description to Jane", it seeds the text with something like, "Niagara Falls is located in North America", instead of what's in the description field of the entity. General questions about the indexed data fail to show any results at all in Siri. For example: "Show me some landmarks from TravelTracking" or "Find Mount Fuji in TravelTracking" produce no results, even though the landmarks are indexed. My original assumption was that indexing data from your app would make it available to Siri, but it only seems to show up in on-device search and not in conversation with Siri itself. So is it the case that such data is only available through a Siri conversation if either you can adopt a domain schema or create a shortcut and use very close to the exact phraseology? And in the case of the latter, you can't really act on the returned entities because basically all you get is what is shown in a snippet? Maybe the on-screen intelligence picks up something here (seems to), but nothing deeper, even if it is defined in the entity. I've put in a feedback request (FB23796681) for a general database domain with schema for common database operations. Perhaps something like this and way to describe record types to aid in understanding from the LLM would go a long way toward making Siri more flexible for agentic use? I can get Siri to do a lot of the things that were shown at WWDC, but that tends to make you think you can do similar things with other types of apps and when you can't because of the domain limitations, it's very frustrating and feels limiting. It seems the domain types fit the apps Apple ships with the OS (Mail, Photos, Notes, etc), but not other types of apps that don't fit that criteria. If I'm missing something here, any guidance would be appreciated.
0
0
176
2w
Accented application name is not recognized in App Shortcuts phrases
Hello, I am trying to set up App Shortcuts with App Intents in my app, which has an accent (é) in the name. It seems that with an accented application name (e.g. "Démo"), shortcuts phrases are not recognized by Siri or with the "App Shortcuts Preview" tool in Xcode. public struct DemoAppShortcuts: AppShortcutsProvider { public static var appShortcuts: [AppShortcut] { AppShortcut( intent: OpenDemoIntent(), phrases: [ "Find the tests in \(.applicationName)", ], shortTitle: "Find tests", systemImageName: "location" ) } } With Siri, when saying the phrase "Find the tests in Démo", the shortcut is not launched I tried with the "App Shortcuts Preview" tool in Xcode, it does not match any Intent. (see screenshot) I set up App Name synonyms as a workaround but it seems to not always work. Has anyone encountered this problem ? Is there any other workaround ? Is this a bug with iOS 27 / Xcode 27 ? I filed a feedback FB23791964 with an Xcode Project
4
0
266
2w
Using AssistantEntity with existing AppEntities for iOS17+
Hi, I have an existing app with AppEntities defined, that works on iOS17+. The AppEntities also have EntityPropertyQuery defined, so they work as 'find intents'. I want to use the new @AssistantEntity which is iOS18+ where possible, while supporting the previous versions. What's the best way to do this? For e.g. I have a 'log' AppEntity: @available(iOS 17.0, *) struct CJLogAppEntity: AppEntity { static var defaultQuery = CJLogAppEntityQuery() .... } struct CJLogAppEntityQuery: EntityPropertyQuery { ... } How do I adopt this with @AssistantEntity(schema: .journal.entry) for iOS18, while maintaining compatibility with iOS17? I don't want to include two different versions of the same AppEntity. Would it just with with the correct @available annotations on both entities?
6
1
516
2w
Siri unable to tune to a live TV channel on tvOS — Intents & Shortcuts not working
Hi everyone, We are developing a live TV streaming app for tvOS that allows users to watch live channels, replay content, and manage cloud recordings. We are struggling to integrate Siri for a seemingly basic use case: switching the live TV channel by voice (e.g. "Hey Siri, switch to channel X on [our app]"). Here is what we have tried and observed: App Intents — we implemented custom intents, but Siri does not resolve them to our app for channel-switching requests. Shortcuts — we added Shortcuts support, but users have to explicitly configure them; Siri never proactively picks our app. In-app and out-of-app — the issue happens in both contexts. When the user asks Siri to switch to a channel, it either does nothing or suggests other applications, never ours. Our questions: Is there a specific INPlayMediaIntent configuration or domain required to handle live TV channel switching via Siri on tvOS? Is proper Siri integration for live TV gated behind the Apple Video Partner Program? If so, is there any public documentation or a path for apps outside the US to access it? Has anyone successfully implemented voice-driven live channel switching on tvOS outside of the Video Partner Program? Any guidance or pointers to relevant WWDC sessions would be greatly appreciated. Thank you.
1
7
333
3w
Can custom App Intents support multi-turn Siri follow-ups without adopting an app schema?
Hi everyone, I’m trying to understand the current capabilities of App Intents and Siri when using custom intents and custom entities, without adopting one of Apple’s predefined app schemas. As an example, imagine I have a shopping app for shoes. I might have one intent that lists shoes available for sale, and another intent that can open a specific shoe in the app or add a specific shoe to favourites. What I’m trying to validate is whether Siri can support multi-turn, contextual follow-up requests in this kind of custom-intent-only setup. For example: User: “Show me the shoes available for sale.” Siri/App: returns a list of shoes. User: “Add the third one to my favourites.” Siri understands that “the third one” refers to the third shoe from the previous result list. This kind of follow-up seems to work in some Apple-defined domains. For example, a user can ask to list calendar events and then follow up with something like “open the third one in Calendar,” and Siri appears to understand the reference to the previous list item. My current understanding is that this kind of conversational context, ordinal reference resolution, and follow-up disambiguation may only be available when adopting one of Apple’s app schemas, where Siri has a richer understanding of the domain and entities. If an app only uses custom App Intents and custom App Entities, without adopting an Apple-defined schema, should we expect Siri to support this kind of multi-turn reference resolution? Or is each turn in the conversation which requires a custom intent invocation effectively handled more independently? I’d appreciate any clarification on whether this is expected to work, currently unsupported, or only available through schema-based integrations. Thanks
1
0
312
3w
Does Siri AI work with app Intents that don't fit any Schemas?
In the past, for any App Intent developers provide to the AppShortcutsProvider, there needed to be explicit phrases provided to trigger the AppShortcut from Siri -- and if the user try to trigger the Shortcut using a slightly different phrase then the Siri does not work. With Siri AI, will App Intents that don't fit any schemas work without needing every phrase to be explicitly programmed?
3
2
422
3w
Xcode 27 beta: @AppEntity(schema: .photos.asset) now requires iOS 27 (compiled for iOS 18 in Xcode 26)
Filed as FB23652582. In Xcode 27 beta, this no longer compiles when the deployment target is below iOS 27: @available(iOS 18.0, *) @AppEntity(schema: .photos.asset) struct AssetEntity: IndexedEntity { ... } // error: 'asset' is only available in iOS 27.0 or newer The identical source compiles under Xcode 26. It looks like the @AppEntity(schema:) macro now resolves .photos.asset to a declaration annotated for iOS 27, whereas in Xcode 26 it resolved to the (now-deprecated) iOS 16 declaration. What seems off: the .photos.album entity in the same domain still builds fine at an iOS 18 deployment target — only .asset requires iOS 27. That asymmetry is what makes me think it may be an unintended availability change rather than a deliberate one. Has anyone else hit this? And is this intended — i.e. is .photos.asset now meant to be iOS 27+ only, or should it still be usable from apps that deploy to iOS 18?
0
2
235
3w
Receiving an on‑screen image from another app via App Intents / Siri (app has no photo library)
I have a photo editing app that owns no photo library. I want a user viewing an image in another app (e.g. Photos) to say "filter this image in MyApp" and have Siri hand that on‑screen image to my intent. Targeting iOS 27. What I've tried, and the result in each case: • App Shortcut + @Parameter var image: IntentFile — Siri resolves my other parameters (a filter AppEnum) by voice, but never binds the image; the run fails. • @AppIntent(schema: .photos.setFilter) with a .photos.asset entity — never routes from Photos. • @AppIntent(schema: .system.open): OpenIntent with a custom AppEntity target — "Open this image in MyApp" just launches the app by name; perform() is never called, and the entity query never runs. My understanding from WWDC26 "Build intelligent Siri experiences with App Schemas" (session 240) and "Discover new capabilities in the App Intents framework" (session 345): • Cross‑app content transfer (Transferable + IntentValueRepresentation) seems limited to system value types (IntentPerson, PlaceDescriptor); IntentFile is not a _SystemIntentValue, so an image can't ride that rail. • Onscreen awareness (NSUserActivity.appEntityIdentifier, View Annotations) appears to expose only the foreground app's own content — which here is Photos, not me. Question: Is there a supported way for a third‑party app to receive another app's on‑screen image (vs. a contact/place) through Siri/App Intents today? If so, which API carries the pixels — an IntentFile parameter, @UnionValue, IntentValueQuery, something else — and what must the source app do to make it available? Or is asking "do X to this image in <third‑party app>" simply not supported yet outside Shortcuts?
2
1
486
4w
Inquiry regarding App Intent file handling in Siri
Hello Team, I am writing to seek clarification regarding an issue I am encountering while integrating App Intents within my application. I have configured an App Intent designed to accept an IntentFile as a parameter for processing. When testing this functionality via the Siri interface, I attach the image file and provide the trigger phrase as expected. However, Siri does not seem to recognize or associate the attached image as the required IntentFile. Consequently, the interaction fails to proceed, and Siri continues to prompt me to select a file. Could you please advise if there is a specific configuration requirement or a known limitation regarding how Siri handles file attachments for IntentFile parameters? I would appreciate any guidance on whether this is an issue with my current implementation or if I am missing a necessary step in the setup process. Thanks & Regards Suresh
1
0
350
4w
Visual Intelligence: controlling the "More results" button and the app result tab (ordering / opt-out)?
I've integrated my app with Visual Intelligence (iOS 26) using the semanticContentSearch schema. Image results are populated via an IntentValueQuery returning my entities, and the "More results" button is backed by an intent declared as: @available(iOS 26.0, *) @AppIntent(schema: .visualIntelligence.semanticContentSearch) struct ShowSearchResultsIntent { static let title: LocalizedStringResource = "Search products by image" static let openAppWhenRun: Bool = true var semanticContent: SemanticContentDescriptor func perform() async throws -> some IntentResult { /* deep-link into in-app search */ } } From WWDC25 (session 275) and WWDC26 (session 297) my understanding is that: the "More results" button is provided automatically by the system once this schema intent is adopted; returning an empty array from the value query lets the system show an empty response; my app appears as a result tab alongside other adopting apps, and the system decides the ordering based on the available image search providers on the device. I have a few questions about how much of this an app can control at runtime: "More results" button Is there any supported way to conditionally show or hide the system "More results" button at runtime (e.g., region, A/B test, server-driven feature flag)? Or is it strictly tied to the static presence of the semanticContentSearch intent? If IntentValueQuery returns an empty array, does the "More results" button still appear? Is there any API to suppress the button while keeping the schema intent declared? App result tab ordering How exactly does the system decide the order of the app result tabs? Is it based on relevance/similarity, app category, user behavior, or something else? Is there anything a developer can do to influence where their tab appears, or is ordering entirely system-controlled? App result tab presence / opt-out Once the integration is implemented, my app's tab appears automatically. Is there a supported way to conditionally opt out of appearing as a result tab at runtime (e.g., based on region or a feature flag)? Or is the only way to not appear to omit the integration at build time (or gate it by OS availability)? Thanks!
0
0
250
Jun ’26
LongRunningIntent run from in the app?
If I attempt to use a LongRunningIntent from a SwiftUI Button, using the Button(_:AppIntent:) control, I get the following errors: [LongRunningIntent <<E:<unknown>>>] No IntentContext available performBackgroundTask threw: noContext Intent failed to execute with error: LNPerformActionErrorCodeUnsupportedValueType It runs as expected when run from the Shortcuts app, but fails when run from a button within the app. Feedback ID (with sample app): FB23492034
1
1
248
Jun ’26
IndexedEntities and Siri AI
Currently, I have spotlight entities show up when I search for them using Spotlight on iOS 27. These entities are things that are important for users, like campus buildings, accessible entrances, assignments, and more. However, after getting access to Siri AI, it seems that none of this information at all is available to Siri, yet all of it is sitting there in the spotlight index and viewable with a written query. I was told by an Apple Engineer that creating Indexed and EnumerableEntities, and indexing them via the App Intents framework, should expose information about these items to Siri, so if I query: "[Building name] in Ohio State" it would at least show me what the app has for that information. Presently, Siri uses the web for everything and doesn't pull in any spotlight information for my app, despite either creating wrapper entities or using the API associating with spotlight. With Siri AI, it would be so much more helpful for a disabled user to say "Orton Hall accessible entrance" and Siri to know that there's 1 accessible entrance indexed in spotlight in my app, and then show or open it, instead of querying the web or saying it can't answer the question. It has all available information already in spotlight to answer this question. Currently, as far as I'm aware, something like this simply doesn't work, unless your app conforms to the strict use cases of making reminders or calendar events, all of which aren't useful here. Can a Frameworks engineer please clarify precisely when and how IndexedEntities (paired with an a corresponding macro-annotated OpenIntent) eg: @AppIntent(schema: .system.open) struct OpenBuildingIntent: OpenIntent { @Parameter(title: "Building") var Building: BuildingEntity ... will or will not be visible using Siri AI? To me it seems I have wasted a lot of time porting actions within my app to App Intents, and viewable entities with AppEntity, only to have Siri not be able to use any of this information out of the box.
2
0
687
Jun ’26
App schema domains for trains, flighs, ferrys and othe public transport
Hi everyone, I've submitted a Feedback request (FB23469644) asking to introduce a generic Transportation Journey schema for App Intents. At the moment, there doesn't seem to be a way to donate structured public transportation trips (train, flight, bus, ferry, etc.) to Siri's semantic index. While many travel apps already have rich journey data, there is no common semantic model that represents: Multi-leg journeys Departure and arrival stations/airports/stops Platforms, tracks, gates, terminals Scheduled and real-time departure/arrival information Delays and cancellations Ticket and reservation information This seems like a natural addition to the existing App Intents schemas and would enable Siri, Spotlight, and Apple Intelligence to better understand upcoming journeys across all transportation providers. If you're building a travel or mobility app and have encountered the same limitation, I'd appreciate hearing your thoughts. Any idea if the old Siri event suggestion API gets is indexed by Siri Semantic Index / Siri AI?
3
6
347
Jun ’26
AppIntents and String catalog: how can we support both singular and plural forms for TypeDisplayRepresentation (used by DeleteIntent in the Shortcuts app for example)
Hello, I’m implementing the AppIntents framework in my app. I want to translate the TypeDisplayRepresentation that is used in the Shortcuts app UI like in a DeleteIntent (see my feedback about this: FB23451186 for more context). In the “Accelerating app interactions with App Intents” sample code we can see that this is done using a .stringsdict file, as follows for the “Trail” key (singular and plural): <key>Trail</key> <dict> <key>NSStringLocalizedFormatKey</key> <string>%#@VARIABLE@</string> <key>VARIABLE</key> <dict> <key>NSStringFormatSpecTypeKey</key> <string>NSStringPluralRuleType</string> <key>one</key> <string>Trail</string> <key>other</key> <string>Trails</string> </dict> </dict> I want to use a String catalog instead of a .stringsdict file because all my strings are in a String catalog. I tried to migrate the AppIntents.stringsdict file manually but it failed with an error: “An error occurred when migrating AppIntentsSampleApp/Resources/AppIntents.stringsdict: This stringsdict cannot be migrated: Missing required key 'NSStringFormatValueTypeKey' inside 'Trail' -> 'VARIABLE’” So I manually added a NSStringFormatValueTypeKey like this in the .stringsdict file: <key>Trail</key> <dict> <key>NSStringLocalizedFormatKey</key> <string>%#@VARIABLE@</string> <key>VARIABLE</key> <dict> <key>NSStringFormatSpecTypeKey</key> <string>NSStringPluralRuleType</string> <key>NSStringFormatValueTypeKey</key> <string>lld</string> <key>one</key> <string>Trail</string> <key>other</key> <string>Trails</string> </dict> </dict> And then I’ve been able to migrate the .stringsdict file into a String catalog. The string catalog looks like this after migration: "Trail" : { "extractionState" : "stale", "localizations" : { "en" : { "stringUnit" : { "state" : "translated", "value" : "%#@VARIABLE@" }, "substitutions" : { "VARIABLE" : { "formatSpecifier" : "lld", "variations" : { "plural" : { "one" : { "stringUnit" : { "state" : "translated", "value" : "Trail (Catalog)" } }, "other" : { "stringUnit" : { "state" : "translated", "value" : "Trails (Catalog)" } } } } } } } } This works, which is nice. But I tried to reproduce the same result by having a %#@VARIABLE@ in my LocalizedStringResource defaultValue like this: TypeDisplayRepresentation( name: LocalizedStringResource( "Flower", defaultValue: "%#@VARIABLE@", table: "AppIntents" ), numericFormat: LocalizedStringResource( "\(placeholder: .int) flower", table: "AppIntents" ) ) But the String catalog doesn’t support that apparently, I can’t get a “substitution” object in my catalog, so I have to manually do it using the source code which is not ideal and painful. Is there a way to support this kind of substitution with no actual plural token in the string as we can see for the %#@VARIABLE@ for Trail? Thank you, Regards, Axel
1
0
366
Jun ’26
AppIntents: how to present a searchable modal picker for an entity relation in an automatic "Find" intent (from EnumerableEntityQuery or EntityPropertyQuery)
Hello, My (fictional) app has multiple app entities like a BookEntity and an AuthorEntity. There is a relationship between them: a book has an author. Because I implement the EntityPropertyQuery for the BookEntityQuery, it creates a “Find Book where...” intent. In this intent, I can filter the data by an author (AuthorEntity). But I can’t find a way to allow the user to select any author using the searchable modal usually presented to “choose” a parameter value from an intent for example. Right now, it shows: a menu with the suggestedEntities() authors if the AuthorEntityQuery implements this function. With no way to search even if the AuthorEntityQuery conforms to the EntityStringQuery. a menu with allEntities() authors if the AuthorEntityQuery conforms to EnumerableEntityQuery and does not implement the suggestedEntities(). With no way to search even if the AuthorEntityQuery conforms to the EntityStringQuery. nothing if suggestedEntities() is not implemented and allEntities() is also not implemented even if the AuthorEntityQuery conforms to the EntityStringQuery. So this means if I implement suggestedEntities(), my users have no way to choose any author not in the suggestions. It’s too limited. if I implement allEntities() but not suggestedEntities(), this could potentially be a lot of entities and it’s not always relevant because then the Shortcuts app with an AuthorEntity parameter will be created for allEntities(), and the UI with always show the full list of allEntities() when I have to pick an author (unless I build a specific DynamicOptionsProvider but this would mean I lose the suggestedEntities() for example. if I just conforms to EntityStringQuery, I can’t select any item at all for this filter (no menu to choose). You can check the attached sample code provided. I checked a bit other apps, for example the Photos app allows you to find a photo based on an album but it lists ALL the albums (which is a lot) with no way to search using string. I also check the Sofa app, it shows the list of SofaListEntity (which implements suggestedEntities() and conforms to EntityStringQuery and EntityQuery). It actually shows all the lists (confirmed by the developer) with no way to search. See attachements from the Sofa developer. Is there a way to support a search for a filter using a relationship conforming to the EntityStringQuery? Is there a way to specify a provider for a @Property of an entity like we can for a @Parameter? For example, I could provide a custom DynamicOptionsProvider for the @Property(title: “Author”) var author which would be independent from the AuthorEntityQuery used elsewhere (parameter intents + Shortcuts). Maybe you can suggest another way to implement this? Maybe I should not rely on a relationship but instead flatten the relationship in the BookEntity to add an “authorName” or “authorID”? I filed this feedback with a sample code: FB23453134 Thanks, Regards, Axel
0
1
262
Jun ’26
App Intents Phone Schema Domain - .phone.startCall does not invoke perform()
We're implementing the App Intents Phone schema domain in our app to enable Siri to initiate calls to our contact entities via our voip. We've implemented a .phone.startCall intent and registered our entities as .phone.phonePerson. The intent provides both the required destination and audioVisualMode parameters, and the perform() method is implemented to handle the call. However, the perform() method is never invoked. Instead, Siri either: Says that the phone number is not linked, or Announces that it is calling, but our app intent is never executed. Anybody implemented this Phone schema domain and it s working successfully ? Sample Code: struct StartCallIntent: AudioRecordingIntent, AudioPlaybackIntent { var destination: CallDestination var audioVisualMode: CallAVMode init(contact: ContactEntity, mode: CallAVMode = .audio) { self.destination = .phonePerson(contact) self.audioVisualMode = mode } func perform() async throws -> some IntentResult { print("Call Initiating to contact") return .result() } @AppEnum(schema: .phone.audioVisualMode) enum CallAVMode: String, CaseIterable { case audio case video } @UnionValue enum CallDestination: Sendable { case phonePerson(ContactEntity) case group([ContactEntity]) } @AppEntity(schema: .phone.phonePerson) struct ContactEntity: IndexedEntity { static var defaultQuery = ContactEntityQuery() let id: UUID var person: IntentPerson }
Replies
3
Boosts
0
Views
712
Activity
3d
Supporting iOS 27 app entity schemas and maintaining backwards compatability
We have an app that supports iOS 18+ We have a couple of AppEntity(s) that we are keen to make work with the new schemas along with several AppIntent(s). We cannot increase our floor to iOS 27 for obvious reasons. All the documentation suggests using the macros, e.g. @AppEntity(schema: .audio.song) struct SongEntity { ... } This refuses to compile below iOS 26. It's possible to add availability checks, e.g. @available(anyAppleOS 27, *) @AppEntity(schema: .audio.song) struct SongEntity { ... } But then the whole entity becomes unavailable on pre-27 OSes. So I tried moving the macro onto an extension, e.g. struct SongEntity { ... } @available(anyAppleOS 27, *) @AppEntity(schema: .audio.song) extension SongEntity { ... } But this results in a compiler error: 'extension' macro cannot be attached to extension (extension of 'SongEntity') One other option is to create a new entity with a totally different name and mark it as isAssistantOnly but this has a lot of quite negative downstream effects that make it unworkable. For example: a lot of code duplication duplication in search indexes if we index both sets of entities awkwardness trying to use NSUserActivity when we have 2 different entity types pain in downstream AppIntent arguments which would require duplicating every AppIntent which has more cascading effects The same issues are present in AppIntent schemas too where even trying to add the most basic @AppIntent(schema: .system.open) to our existing OpenIntent doesn't seem possible for all the same reasons. I am really struggling with how to structure code so we can support schemas, currently I don't really see a path forward here until our floor raises to iOS 27. Is there a way to make this work nicely with the current APIs? What are others doing here? How can apps can ship in September and support both this and pre iOS 27 cleanly? Thinking about solutions here, my ideal would be that the macros are improved to either: be able to be applied to an extension rather than the structure itself. expand in such a way that they still build the core AppEntity / AppIntent on pre 27 OSes but then add the iOS 27 schema additions behind @available internally so they can be used with older targets as essentially no-ops on the current definitions.
Replies
3
Boosts
1
Views
978
Activity
1w
Supporting legacy INAddTasksIntent and the new .reminders.createReminder App Intent schema
We have a list app that implements INAddTasksIntent so users can add items to our app with Siri. We're now working on implementing an App Intent for the .reminders.createReminder schema for iOS 27. Our app still supports iOS 18, so it implements both INAddTasksIntent and the .reminders.createReminder schema. Observed behavior (iOS 27 beta 4): When we say "Siri, add eggs to my grocery list in AppName", Siri routes the request to the legacy INAddTasksIntent handler in our SiriKit extension. Our new CreateReminderIntent is never invoked. I confirmed this with breakpoints and logging in both handlers. The CreateReminderIntent does seem to be set up correctly, because it appears in the Shortcuts app and I can invoke it via AppIntentsTesting. Also, after using the above phrase, I was able to say "Siri, add cookies to my grocery list" and the item got added to my app via the INAddTasksIntent, even though I didn't specify the app name in the request. This also worked with a version of our app that does not contain CreateReminderIntent running on iOS 26.5. Isn't the app name normally required for INAddTasksIntent to be invoked? Questions: Is Siri activating the INAddTasksIntent instead of the new CreateReminderIntent expected behavior? Are users on iOS 27 going to have a worse experience adding items to our app with Siri if we support both INAddTasksIntent and the new CreateReminderIntent? If so, how do you recommend we proceed? Thank you for any guidance you can provide.
Replies
2
Boosts
0
Views
143
Activity
1w
Hiding unsupported parameters of a schema-conforming intent from Shortcuts
I've adopted the .reminders.createReminder schema so users can create reminders in my app via Siri and Apple Intelligence. My app only supports a subset of the schema (title, list, and note), but the macro requires me to declare all the other parameters (e.g. isFlagged, tags), so I declare them and ignore them in perform(). The problem: in the Shortcuts app, every declared parameter shows up as an editable field, so it looks like my app supports flags, tags, etc when it doesn't, and the values are silently ignored if the user sets them. Is there a supported way to keep parameters my app can't fulfill from appearing in Shortcuts while still conforming to the schema? The best workaround I've found is to mark the schema intent isAssistantOnly = true (which hides it from Shortcuts while keeping it available to Siri/Apple Intelligence), and then use AppShortcutsProvider to provide a separate non-schema AppIntent that exposes just title/list/note to Shortcuts. However, the docs describe isAssistantOnly as a migration aid that's only intended to be enabled temporarily while migrating an existing intent to an app schema intent. Questions: Is that a supported use of the isAssistantOnly property? Is there a way to mark individual parameters as unsupported so they do not appear in Shortcuts? Is there another recommended approach when an app can only fulfill part of a schema? Thank you!
Replies
0
Boosts
0
Views
133
Activity
1w
Use ShowInAppSearchResultsIntent with custom Parameters
I’m currently using ShowInAppSearchResultsIntent to open the app in a selectable view with the search results. The user can choose which view to pick via a @Parameter. Though with iOS 27 I can’t compile this intent anymore, because of this error: 'ShowInAppSearchResultsIntent' must only have a 'criteria' parameter What is the best practice to offer the same selection of the search view with iOS 27 and newer then? My Code import AppIntents @AppIntent(schema: .system.search) struct SearchAppIntent: ShowInAppSearchResultsIntent { static let searchScopes: [StringSearchScope] = [.general] var criteria: StringSearchCriteria // MARK: Parameters @Parameter(default: .loans) var target: SearchView? // MARK: Action Text static var parameterSummary: some ParameterSummary { Summary("Search \(\.$criteria) in \(\.$target)", table: "Shortcuts") } // MARK: Action @MainActor func perform() async throws -> some IntentResult { switch target { case .general, nil: // Open app search tab NavigationManager.shared.openAppSearch(with: criteria.term) case .contacts: // Open contacts tab NavigationManager.shared.openContactsSearch(with: criteria.term) } return .result() } }
Replies
4
Boosts
0
Views
341
Activity
2w
Guidance Needed on App Entities, Intents, and the New Siri
I'm trying to get some clarity on how the new Siri deals with IndexedEntities and whether it's worth adopting, considering our app does not fit into any of the predefined domain schemas. In running some tests with the TravelTracking sample app, it seems the only way I can get Siri to show any of the referenced entities is by using the exact phrasing (or extremely close to it) in one of the donated shortcuts. If I ask Siri to "Find closest landmark in TravelTracking" produces a result from the App in the form of an app snippet. But, if I then ask it "Text the description to Jane", it seeds the text with something like, "Niagara Falls is located in North America", instead of what's in the description field of the entity. General questions about the indexed data fail to show any results at all in Siri. For example: "Show me some landmarks from TravelTracking" or "Find Mount Fuji in TravelTracking" produce no results, even though the landmarks are indexed. My original assumption was that indexing data from your app would make it available to Siri, but it only seems to show up in on-device search and not in conversation with Siri itself. So is it the case that such data is only available through a Siri conversation if either you can adopt a domain schema or create a shortcut and use very close to the exact phraseology? And in the case of the latter, you can't really act on the returned entities because basically all you get is what is shown in a snippet? Maybe the on-screen intelligence picks up something here (seems to), but nothing deeper, even if it is defined in the entity. I've put in a feedback request (FB23796681) for a general database domain with schema for common database operations. Perhaps something like this and way to describe record types to aid in understanding from the LLM would go a long way toward making Siri more flexible for agentic use? I can get Siri to do a lot of the things that were shown at WWDC, but that tends to make you think you can do similar things with other types of apps and when you can't because of the domain limitations, it's very frustrating and feels limiting. It seems the domain types fit the apps Apple ships with the OS (Mail, Photos, Notes, etc), but not other types of apps that don't fit that criteria. If I'm missing something here, any guidance would be appreciated.
Replies
0
Boosts
0
Views
176
Activity
2w
Accented application name is not recognized in App Shortcuts phrases
Hello, I am trying to set up App Shortcuts with App Intents in my app, which has an accent (é) in the name. It seems that with an accented application name (e.g. "Démo"), shortcuts phrases are not recognized by Siri or with the "App Shortcuts Preview" tool in Xcode. public struct DemoAppShortcuts: AppShortcutsProvider { public static var appShortcuts: [AppShortcut] { AppShortcut( intent: OpenDemoIntent(), phrases: [ "Find the tests in \(.applicationName)", ], shortTitle: "Find tests", systemImageName: "location" ) } } With Siri, when saying the phrase "Find the tests in Démo", the shortcut is not launched I tried with the "App Shortcuts Preview" tool in Xcode, it does not match any Intent. (see screenshot) I set up App Name synonyms as a workaround but it seems to not always work. Has anyone encountered this problem ? Is there any other workaround ? Is this a bug with iOS 27 / Xcode 27 ? I filed a feedback FB23791964 with an Xcode Project
Replies
4
Boosts
0
Views
266
Activity
2w
Using AssistantEntity with existing AppEntities for iOS17+
Hi, I have an existing app with AppEntities defined, that works on iOS17+. The AppEntities also have EntityPropertyQuery defined, so they work as 'find intents'. I want to use the new @AssistantEntity which is iOS18+ where possible, while supporting the previous versions. What's the best way to do this? For e.g. I have a 'log' AppEntity: @available(iOS 17.0, *) struct CJLogAppEntity: AppEntity { static var defaultQuery = CJLogAppEntityQuery() .... } struct CJLogAppEntityQuery: EntityPropertyQuery { ... } How do I adopt this with @AssistantEntity(schema: .journal.entry) for iOS18, while maintaining compatibility with iOS17? I don't want to include two different versions of the same AppEntity. Would it just with with the correct @available annotations on both entities?
Replies
6
Boosts
1
Views
516
Activity
2w
Siri unable to tune to a live TV channel on tvOS — Intents & Shortcuts not working
Hi everyone, We are developing a live TV streaming app for tvOS that allows users to watch live channels, replay content, and manage cloud recordings. We are struggling to integrate Siri for a seemingly basic use case: switching the live TV channel by voice (e.g. "Hey Siri, switch to channel X on [our app]"). Here is what we have tried and observed: App Intents — we implemented custom intents, but Siri does not resolve them to our app for channel-switching requests. Shortcuts — we added Shortcuts support, but users have to explicitly configure them; Siri never proactively picks our app. In-app and out-of-app — the issue happens in both contexts. When the user asks Siri to switch to a channel, it either does nothing or suggests other applications, never ours. Our questions: Is there a specific INPlayMediaIntent configuration or domain required to handle live TV channel switching via Siri on tvOS? Is proper Siri integration for live TV gated behind the Apple Video Partner Program? If so, is there any public documentation or a path for apps outside the US to access it? Has anyone successfully implemented voice-driven live channel switching on tvOS outside of the Video Partner Program? Any guidance or pointers to relevant WWDC sessions would be greatly appreciated. Thank you.
Replies
1
Boosts
7
Views
333
Activity
3w
Can custom App Intents support multi-turn Siri follow-ups without adopting an app schema?
Hi everyone, I’m trying to understand the current capabilities of App Intents and Siri when using custom intents and custom entities, without adopting one of Apple’s predefined app schemas. As an example, imagine I have a shopping app for shoes. I might have one intent that lists shoes available for sale, and another intent that can open a specific shoe in the app or add a specific shoe to favourites. What I’m trying to validate is whether Siri can support multi-turn, contextual follow-up requests in this kind of custom-intent-only setup. For example: User: “Show me the shoes available for sale.” Siri/App: returns a list of shoes. User: “Add the third one to my favourites.” Siri understands that “the third one” refers to the third shoe from the previous result list. This kind of follow-up seems to work in some Apple-defined domains. For example, a user can ask to list calendar events and then follow up with something like “open the third one in Calendar,” and Siri appears to understand the reference to the previous list item. My current understanding is that this kind of conversational context, ordinal reference resolution, and follow-up disambiguation may only be available when adopting one of Apple’s app schemas, where Siri has a richer understanding of the domain and entities. If an app only uses custom App Intents and custom App Entities, without adopting an Apple-defined schema, should we expect Siri to support this kind of multi-turn reference resolution? Or is each turn in the conversation which requires a custom intent invocation effectively handled more independently? I’d appreciate any clarification on whether this is expected to work, currently unsupported, or only available through schema-based integrations. Thanks
Replies
1
Boosts
0
Views
312
Activity
3w
Does Siri AI work with app Intents that don't fit any Schemas?
In the past, for any App Intent developers provide to the AppShortcutsProvider, there needed to be explicit phrases provided to trigger the AppShortcut from Siri -- and if the user try to trigger the Shortcut using a slightly different phrase then the Siri does not work. With Siri AI, will App Intents that don't fit any schemas work without needing every phrase to be explicitly programmed?
Replies
3
Boosts
2
Views
422
Activity
3w
Xcode 27 beta: @AppEntity(schema: .photos.asset) now requires iOS 27 (compiled for iOS 18 in Xcode 26)
Filed as FB23652582. In Xcode 27 beta, this no longer compiles when the deployment target is below iOS 27: @available(iOS 18.0, *) @AppEntity(schema: .photos.asset) struct AssetEntity: IndexedEntity { ... } // error: 'asset' is only available in iOS 27.0 or newer The identical source compiles under Xcode 26. It looks like the @AppEntity(schema:) macro now resolves .photos.asset to a declaration annotated for iOS 27, whereas in Xcode 26 it resolved to the (now-deprecated) iOS 16 declaration. What seems off: the .photos.album entity in the same domain still builds fine at an iOS 18 deployment target — only .asset requires iOS 27. That asymmetry is what makes me think it may be an unintended availability change rather than a deliberate one. Has anyone else hit this? And is this intended — i.e. is .photos.asset now meant to be iOS 27+ only, or should it still be usable from apps that deploy to iOS 18?
Replies
0
Boosts
2
Views
235
Activity
3w
Receiving an on‑screen image from another app via App Intents / Siri (app has no photo library)
I have a photo editing app that owns no photo library. I want a user viewing an image in another app (e.g. Photos) to say "filter this image in MyApp" and have Siri hand that on‑screen image to my intent. Targeting iOS 27. What I've tried, and the result in each case: • App Shortcut + @Parameter var image: IntentFile — Siri resolves my other parameters (a filter AppEnum) by voice, but never binds the image; the run fails. • @AppIntent(schema: .photos.setFilter) with a .photos.asset entity — never routes from Photos. • @AppIntent(schema: .system.open): OpenIntent with a custom AppEntity target — "Open this image in MyApp" just launches the app by name; perform() is never called, and the entity query never runs. My understanding from WWDC26 "Build intelligent Siri experiences with App Schemas" (session 240) and "Discover new capabilities in the App Intents framework" (session 345): • Cross‑app content transfer (Transferable + IntentValueRepresentation) seems limited to system value types (IntentPerson, PlaceDescriptor); IntentFile is not a _SystemIntentValue, so an image can't ride that rail. • Onscreen awareness (NSUserActivity.appEntityIdentifier, View Annotations) appears to expose only the foreground app's own content — which here is Photos, not me. Question: Is there a supported way for a third‑party app to receive another app's on‑screen image (vs. a contact/place) through Siri/App Intents today? If so, which API carries the pixels — an IntentFile parameter, @UnionValue, IntentValueQuery, something else — and what must the source app do to make it available? Or is asking "do X to this image in <third‑party app>" simply not supported yet outside Shortcuts?
Replies
2
Boosts
1
Views
486
Activity
4w
Inquiry regarding App Intent file handling in Siri
Hello Team, I am writing to seek clarification regarding an issue I am encountering while integrating App Intents within my application. I have configured an App Intent designed to accept an IntentFile as a parameter for processing. When testing this functionality via the Siri interface, I attach the image file and provide the trigger phrase as expected. However, Siri does not seem to recognize or associate the attached image as the required IntentFile. Consequently, the interaction fails to proceed, and Siri continues to prompt me to select a file. Could you please advise if there is a specific configuration requirement or a known limitation regarding how Siri handles file attachments for IntentFile parameters? I would appreciate any guidance on whether this is an issue with my current implementation or if I am missing a necessary step in the setup process. Thanks & Regards Suresh
Replies
1
Boosts
0
Views
350
Activity
4w
Visual Intelligence: controlling the "More results" button and the app result tab (ordering / opt-out)?
I've integrated my app with Visual Intelligence (iOS 26) using the semanticContentSearch schema. Image results are populated via an IntentValueQuery returning my entities, and the "More results" button is backed by an intent declared as: @available(iOS 26.0, *) @AppIntent(schema: .visualIntelligence.semanticContentSearch) struct ShowSearchResultsIntent { static let title: LocalizedStringResource = "Search products by image" static let openAppWhenRun: Bool = true var semanticContent: SemanticContentDescriptor func perform() async throws -> some IntentResult { /* deep-link into in-app search */ } } From WWDC25 (session 275) and WWDC26 (session 297) my understanding is that: the "More results" button is provided automatically by the system once this schema intent is adopted; returning an empty array from the value query lets the system show an empty response; my app appears as a result tab alongside other adopting apps, and the system decides the ordering based on the available image search providers on the device. I have a few questions about how much of this an app can control at runtime: "More results" button Is there any supported way to conditionally show or hide the system "More results" button at runtime (e.g., region, A/B test, server-driven feature flag)? Or is it strictly tied to the static presence of the semanticContentSearch intent? If IntentValueQuery returns an empty array, does the "More results" button still appear? Is there any API to suppress the button while keeping the schema intent declared? App result tab ordering How exactly does the system decide the order of the app result tabs? Is it based on relevance/similarity, app category, user behavior, or something else? Is there anything a developer can do to influence where their tab appears, or is ordering entirely system-controlled? App result tab presence / opt-out Once the integration is implemented, my app's tab appears automatically. Is there a supported way to conditionally opt out of appearing as a result tab at runtime (e.g., based on region or a feature flag)? Or is the only way to not appear to omit the integration at build time (or gate it by OS availability)? Thanks!
Replies
0
Boosts
0
Views
250
Activity
Jun ’26
LongRunningIntent run from in the app?
If I attempt to use a LongRunningIntent from a SwiftUI Button, using the Button(_:AppIntent:) control, I get the following errors: [LongRunningIntent <<E:<unknown>>>] No IntentContext available performBackgroundTask threw: noContext Intent failed to execute with error: LNPerformActionErrorCodeUnsupportedValueType It runs as expected when run from the Shortcuts app, but fails when run from a button within the app. Feedback ID (with sample app): FB23492034
Replies
1
Boosts
1
Views
248
Activity
Jun ’26
IndexedEntities and Siri AI
Currently, I have spotlight entities show up when I search for them using Spotlight on iOS 27. These entities are things that are important for users, like campus buildings, accessible entrances, assignments, and more. However, after getting access to Siri AI, it seems that none of this information at all is available to Siri, yet all of it is sitting there in the spotlight index and viewable with a written query. I was told by an Apple Engineer that creating Indexed and EnumerableEntities, and indexing them via the App Intents framework, should expose information about these items to Siri, so if I query: "[Building name] in Ohio State" it would at least show me what the app has for that information. Presently, Siri uses the web for everything and doesn't pull in any spotlight information for my app, despite either creating wrapper entities or using the API associating with spotlight. With Siri AI, it would be so much more helpful for a disabled user to say "Orton Hall accessible entrance" and Siri to know that there's 1 accessible entrance indexed in spotlight in my app, and then show or open it, instead of querying the web or saying it can't answer the question. It has all available information already in spotlight to answer this question. Currently, as far as I'm aware, something like this simply doesn't work, unless your app conforms to the strict use cases of making reminders or calendar events, all of which aren't useful here. Can a Frameworks engineer please clarify precisely when and how IndexedEntities (paired with an a corresponding macro-annotated OpenIntent) eg: @AppIntent(schema: .system.open) struct OpenBuildingIntent: OpenIntent { @Parameter(title: "Building") var Building: BuildingEntity ... will or will not be visible using Siri AI? To me it seems I have wasted a lot of time porting actions within my app to App Intents, and viewable entities with AppEntity, only to have Siri not be able to use any of this information out of the box.
Replies
2
Boosts
0
Views
687
Activity
Jun ’26
App schema domains for trains, flighs, ferrys and othe public transport
Hi everyone, I've submitted a Feedback request (FB23469644) asking to introduce a generic Transportation Journey schema for App Intents. At the moment, there doesn't seem to be a way to donate structured public transportation trips (train, flight, bus, ferry, etc.) to Siri's semantic index. While many travel apps already have rich journey data, there is no common semantic model that represents: Multi-leg journeys Departure and arrival stations/airports/stops Platforms, tracks, gates, terminals Scheduled and real-time departure/arrival information Delays and cancellations Ticket and reservation information This seems like a natural addition to the existing App Intents schemas and would enable Siri, Spotlight, and Apple Intelligence to better understand upcoming journeys across all transportation providers. If you're building a travel or mobility app and have encountered the same limitation, I'd appreciate hearing your thoughts. Any idea if the old Siri event suggestion API gets is indexed by Siri Semantic Index / Siri AI?
Replies
3
Boosts
6
Views
347
Activity
Jun ’26
AppIntents and String catalog: how can we support both singular and plural forms for TypeDisplayRepresentation (used by DeleteIntent in the Shortcuts app for example)
Hello, I’m implementing the AppIntents framework in my app. I want to translate the TypeDisplayRepresentation that is used in the Shortcuts app UI like in a DeleteIntent (see my feedback about this: FB23451186 for more context). In the “Accelerating app interactions with App Intents” sample code we can see that this is done using a .stringsdict file, as follows for the “Trail” key (singular and plural): <key>Trail</key> <dict> <key>NSStringLocalizedFormatKey</key> <string>%#@VARIABLE@</string> <key>VARIABLE</key> <dict> <key>NSStringFormatSpecTypeKey</key> <string>NSStringPluralRuleType</string> <key>one</key> <string>Trail</string> <key>other</key> <string>Trails</string> </dict> </dict> I want to use a String catalog instead of a .stringsdict file because all my strings are in a String catalog. I tried to migrate the AppIntents.stringsdict file manually but it failed with an error: “An error occurred when migrating AppIntentsSampleApp/Resources/AppIntents.stringsdict: This stringsdict cannot be migrated: Missing required key 'NSStringFormatValueTypeKey' inside 'Trail' -> 'VARIABLE’” So I manually added a NSStringFormatValueTypeKey like this in the .stringsdict file: <key>Trail</key> <dict> <key>NSStringLocalizedFormatKey</key> <string>%#@VARIABLE@</string> <key>VARIABLE</key> <dict> <key>NSStringFormatSpecTypeKey</key> <string>NSStringPluralRuleType</string> <key>NSStringFormatValueTypeKey</key> <string>lld</string> <key>one</key> <string>Trail</string> <key>other</key> <string>Trails</string> </dict> </dict> And then I’ve been able to migrate the .stringsdict file into a String catalog. The string catalog looks like this after migration: "Trail" : { "extractionState" : "stale", "localizations" : { "en" : { "stringUnit" : { "state" : "translated", "value" : "%#@VARIABLE@" }, "substitutions" : { "VARIABLE" : { "formatSpecifier" : "lld", "variations" : { "plural" : { "one" : { "stringUnit" : { "state" : "translated", "value" : "Trail (Catalog)" } }, "other" : { "stringUnit" : { "state" : "translated", "value" : "Trails (Catalog)" } } } } } } } } This works, which is nice. But I tried to reproduce the same result by having a %#@VARIABLE@ in my LocalizedStringResource defaultValue like this: TypeDisplayRepresentation( name: LocalizedStringResource( "Flower", defaultValue: "%#@VARIABLE@", table: "AppIntents" ), numericFormat: LocalizedStringResource( "\(placeholder: .int) flower", table: "AppIntents" ) ) But the String catalog doesn’t support that apparently, I can’t get a “substitution” object in my catalog, so I have to manually do it using the source code which is not ideal and painful. Is there a way to support this kind of substitution with no actual plural token in the string as we can see for the %#@VARIABLE@ for Trail? Thank you, Regards, Axel
Replies
1
Boosts
0
Views
366
Activity
Jun ’26
AppIntents: how to present a searchable modal picker for an entity relation in an automatic "Find" intent (from EnumerableEntityQuery or EntityPropertyQuery)
Hello, My (fictional) app has multiple app entities like a BookEntity and an AuthorEntity. There is a relationship between them: a book has an author. Because I implement the EntityPropertyQuery for the BookEntityQuery, it creates a “Find Book where...” intent. In this intent, I can filter the data by an author (AuthorEntity). But I can’t find a way to allow the user to select any author using the searchable modal usually presented to “choose” a parameter value from an intent for example. Right now, it shows: a menu with the suggestedEntities() authors if the AuthorEntityQuery implements this function. With no way to search even if the AuthorEntityQuery conforms to the EntityStringQuery. a menu with allEntities() authors if the AuthorEntityQuery conforms to EnumerableEntityQuery and does not implement the suggestedEntities(). With no way to search even if the AuthorEntityQuery conforms to the EntityStringQuery. nothing if suggestedEntities() is not implemented and allEntities() is also not implemented even if the AuthorEntityQuery conforms to the EntityStringQuery. So this means if I implement suggestedEntities(), my users have no way to choose any author not in the suggestions. It’s too limited. if I implement allEntities() but not suggestedEntities(), this could potentially be a lot of entities and it’s not always relevant because then the Shortcuts app with an AuthorEntity parameter will be created for allEntities(), and the UI with always show the full list of allEntities() when I have to pick an author (unless I build a specific DynamicOptionsProvider but this would mean I lose the suggestedEntities() for example. if I just conforms to EntityStringQuery, I can’t select any item at all for this filter (no menu to choose). You can check the attached sample code provided. I checked a bit other apps, for example the Photos app allows you to find a photo based on an album but it lists ALL the albums (which is a lot) with no way to search using string. I also check the Sofa app, it shows the list of SofaListEntity (which implements suggestedEntities() and conforms to EntityStringQuery and EntityQuery). It actually shows all the lists (confirmed by the developer) with no way to search. See attachements from the Sofa developer. Is there a way to support a search for a filter using a relationship conforming to the EntityStringQuery? Is there a way to specify a provider for a @Property of an entity like we can for a @Parameter? For example, I could provide a custom DynamicOptionsProvider for the @Property(title: “Author”) var author which would be independent from the AuthorEntityQuery used elsewhere (parameter intents + Shortcuts). Maybe you can suggest another way to implement this? Maybe I should not rely on a relationship but instead flatten the relationship in the BookEntity to add an “authorName” or “authorID”? I filed this feedback with a sample code: FB23453134 Thanks, Regards, Axel
Replies
0
Boosts
1
Views
262
Activity
Jun ’26