App Intents

RSS for tag

Extend your app’s custom functionality to support system-level services, like Siri and the Shortcuts app.

Posts under App Intents tag

200 Posts

Post

Replies

Boosts

Views

Activity

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.
1
0
42
8h
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
32
2d
Is `.appEntityIdentifier` + `Transferable` the intended way to let Siri send an on-screen image to another app? (iOS 27)
I'm trying to make a third-party app's on-screen image available to Siri / Apple Intelligence so the user can say something like "send this to " and have the image handed off. And I'd like to confirm whether I'm using the intended mechanism or whether this particular case just isn't supported yet. What I'm trying to do My app shows a single image (it owns no photo library, the image is an in-app render). I want the user to be able to reference it as "this" and have Siri move it to another app. What I implemented (following Making onscreen content available to Siri and Apple Intelligence and WWDC26 240/343) A plain AppEntity with a stable id, conforming to Transferable, annotated on the image view with the iOS 27 .appEntityIdentifier(_:) modifier: struct OnScreenImageEntity: AppEntity, Transferable { static let typeDisplayRepresentation = TypeDisplayRepresentation(name: "On-Screen Image") static let defaultQuery = Query() let id: String static var transferRepresentation: some TransferRepresentation { DataRepresentation(exportedContentType: .plainText) { … } // distinctive text DataRepresentation(exportedContentType: .png) { … } // the image } struct Query: EntityQuery { func entities(for ids: [String]) async throws -> [OnScreenImageEntity] { logger.notice("entities(for:) CALLED \(ids)") // <- never fires return ids.filter { store.isCurrent($0) }.map(OnScreenImageEntity.init) } } } // on the view: Image(uiImage: image) .appEntityIdentifier(EntityIdentifier(for: OnScreenImageEntity.self, identifier: id)) What I observe (iOS 27 Beta 3, device) "Describe this image" / "Create a note for this" appear to use an automatic screenshot — the responses reference my app's UI chrome, and EntityQuery.entities(for:) is never called, so my entity's Transferable is not involved at all. "Send this to " doesn't attach the image; Siri says something like "I can't attach the image directly from your screen," which again sounds like a screen grab. entities(for:) is not called. The only flow that resolves my entity is the ChatGPT hand-off: asking Siri about the on-screen content calls entities(for:) (several times). But even there it stalls — Siri responds "could not clarify what you mean by 'about this'… document, image, or topic?", and no Transferable representation is ever read (my export closures never run). So the entity resolves, yet the content is never actually transferred. The older NSUserActivity.appEntityIdentifier route was never consumed at all; only the iOS 27 .appEntityIdentifier(_:) view modifier produced any resolution, and only in the ChatGPT flow above. I also understand from WWDC26 240/343 that the cross-app content move is built on IntentValueRepresentation (entity ↔ a system value type like IntentPerson), which the recipient imports via IntentValueQuery / IntentValueRepresentation(importing:). Since there doesn't seem to be a system value type for an arbitrary image (and IntentFile isn't one), I'm not sure an image entity can participate in that transfer at all. My questions Is .appEntityIdentifier(_:) the intended way to expose a single on-screen item in iOS 27? It only resolves my entity in the ChatGPT hand-off, and even then the Transferable is never read — under what conditions is the resolved entity's Transferable actually consumed? Are on-screen content requests ("describe this", "create a note for this") ever meant to use an app-provided AppEntity + Transferable, or are they always served by screen capture? (For me they never call entities(for:).) Is there a supported path for Siri to send an image from a third-party app's on-screen content to another app? If the transfer requires IntentValueRepresentation and there's no image system value, is a Transferable image representation ever consumed for this — and if so, how is it triggered? If this is simply not supported for image content yet, that's useful to know too, I just want to make sure I'm not missing a required piece (a schema conformance, an eligibility flag, a different annotation API, etc.). I have a minimal sample project that reproduces this (single annotated image, no photo library, logs to a subsystem so you can see entities(for:) never being called) and filed it as Feedback FB23813341 — happy to share details. Thanks!
4
3
182
2d
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
145
5d
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
223
1w
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
245
1w
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
294
1w
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
1
148
1w
Spotlight on finds title attribute (OS27 b3)
Hi, it seems that something in OS27b3 changed regarding Core Spotlight: Whatever I try, Siri and Spotlight only seem to find the text inside the title or displayName attribute. But attributes like textContent or contentDescription or keywords seem to be ignored. Those attributes are still found, when I do a manual search using CSUserQuery or using the AppEntityDefinition.spotlightQuery(_:) in App Intent Testing. I have already filed a Feedback – but wonder whether anyone else is having this issue? FB23635795 Thanks, Friedrich
2
0
196
2w
Siri AI’s onscreen awareness can’t understand an AppEntity without a schema?
Use Case I’m currently developing , a hiking and cycling app. I’d like to use Siri AI in iOS/watchOS 27 to create an experience like this: While users are recording an activity in app, they can raise their wrist or invoke Siri on iPhone and simply ask: “How much farther to the destination?” “How far have I already gone?” “How much elevation gain is left?” “How far is it to the next waypoint?” … Siri can then answer based on the app’s current workout context. Since there are many metrics like these, and it’s not convenient to look at the screen while cycling or trail running, this could be a really valuable use case if Siri AI can support it. I defined an AppEntity like this, and then associated it with the UI. But I found that Siri AI doesn’t seem to understand this AppEntity. It can only understand the content it can see on the screen, even though I can see that it did execute ToobooWorkoutSessionQuery, the EntityQuery. This screen has multiple tabs. Siri understood the on-screen values such as “Distance: 0.21 mi” and “Remaining Distance: 0.14 mi”, but it didn’t know the data from the other tabs on the same page, such as heart rate, average speed, and so on. So it seems that Siri is directly reading the screen, instead of retrieving the information from the AppEntity I actually provided. Is this because the AppEntity doesn’t use one of the schemas defined by AppSchemaEntity, so Siri AI can’t understand it? App Intents without a schema seem to have a similar issue. If the AppIntent I define is not within one of those schemas, Siri won’t directly execute it either. My current solution: I defined many Intents and Shortcuts. Siri AI’s ability to parse shortcuts seems to be much smarter in the new system, and it can match them quite easily. Also, shortcuts don’t require the app to be in the foreground. However, when talking to Siri, the shortcut phrase has to include the app name, which feels a bit unnatural. For example: “How far have I traveled in xxx app?”
0
0
162
2w
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
382
2w
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
268
2w
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
172
3w
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
558
3w
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
266
3w
iOS 26.5 breaks AppIntents with AppEnums defined in Swift Package
For some reason since iOS 26.5, a ControlWidgetButton or a Button in a widget configured with an AppIntent conforming to OpenIntent fails to receive its AppEnum parameter correctly if the intent and enum are defined inside a shared Swift Package. Tapping the control widget button opens the main application, but it doesn't pass the AppEnum parameter value in, leaving the app on its default screen instead of navigating to the intended view. This was working perfectly in iOS 26.4, where the app would launch and receive the correct enum case from the intent. No code, configuration, or scheme changes were made between the two runs, only the simulator/OS version differs. Has anyone else run into what seems to be a regression on iOS 26.5? I filed feedback with a sample project: FB22848510
1
2
743
3w
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
292
3w
iOS 27+26+18: Spotlight only finds title, not textContent nor contentDescription.
Related feedback: FB16995719 This is an old one, that has not been solved in iOS 27. This is very annoying since iOS 27 brings new AI stuff to Spotlight, that can't be used because of this bug. Jennifer has acknowledged this bug during a one-on-one session last year (WWDC25) where we carefully reviewed my code. I simply would like that the app documents content to be indexed. It's simple text that I pass to textContent. ------- try await CSSearchableIndex.default().indexAppEntities([entity]) // How the indexing is called ------- @available(iOS 18, *) /// The IndexedEntity struct DocumentEntity: IndexedEntity, Identifiable { static var typeDisplayRepresentation: TypeDisplayRepresentation { TypeDisplayRepresentation(name: LocalizedStringResource("INTENT_DOCUMENT_DISPLAY_REP")) } static let defaultQuery = DocumentQuery() // A unique identifier for each document let id: NSManagedObjectID let title: String? let thumbnailData: Data? // The document's text to be indexed let textContent: String? let pageCount: Int // A display representation for UI purposes. var displayRepresentation: DisplayRepresentation { DisplayRepresentation( title: "\(title ?? "")", image: thumbnailData == nil ? nil : .init(data: thumbnailData!) // INDEXED successfully through the use of @available(iOS 18, *) struct DocumentEntity: IndexedEntity, Identifiable { static var typeDisplayRepresentation: TypeDisplayRepresentation { TypeDisplayRepresentation(name: LocalizedStringResource("INTENT_DOCUMENT_DISPLAY_REP")) } static let defaultQuery = DocumentQuery() // A unique identifier for each document (for example, your NSManagedObject's objectID). let id: NSManagedObjectID let title: String? let thumbnailData: Data? // The OCR text to be indexed let textContent: String? let pageCount: Int // A display representation for UI purposes. var displayRepresentation: DisplayRepresentation { DisplayRepresentation( title: "\(title ?? "")", image: thumbnailData == nil ? nil : .init(data: thumbnailData!) ) } } ) } } @available(iOS 18, *) extension DocumentEntity { // The attributeSet for Spotlight var attributeSet: CSSearchableItemAttributeSet { let attributeSet = defaultAttributeSet attributeSet.title = title attributeSet.displayName = title // THIS ONE IS INDEXED attributeSet.contentType = UTType.plainText.identifier attributeSet.textContent = textContent // THIS ONE IS **NOT** INDEXED attributeSet.pageCount = NSNumber(integerLiteral: pageCount) // THIS ONE IS INDEXED attributeSet.thumbnailData = thumbnailData attributeSet.creator = Constants.APP_NAME return attributeSet } } Related: https://discussions.apple.com/thread/256061571
0
1
202
3w
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
199
3w
DeleteIntent: the singular typeDisplayRepresentation of the AppEntity is used instead of the entities parameter title (plural)
Hello, I'm using a DeleteIntent in my app, but I can't get it to display "Delete {Books}" in the Shortcut apps. It always displays "Delete {Book}". It apparently uses the BookEntity typeDisplayRepresentation instead of using the intent entities parameter title ("Books") in the parameterSummary. For a "normal" AppIntent, the Shortcuts app uses the entities parameter title ("Books") in the parameterSummary. I filed a feedback: FB23451186 Regards, Axel
0
0
190
3w
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
1
Boosts
0
Views
42
Activity
8h
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
32
Activity
2d
Is `.appEntityIdentifier` + `Transferable` the intended way to let Siri send an on-screen image to another app? (iOS 27)
I'm trying to make a third-party app's on-screen image available to Siri / Apple Intelligence so the user can say something like "send this to " and have the image handed off. And I'd like to confirm whether I'm using the intended mechanism or whether this particular case just isn't supported yet. What I'm trying to do My app shows a single image (it owns no photo library, the image is an in-app render). I want the user to be able to reference it as "this" and have Siri move it to another app. What I implemented (following Making onscreen content available to Siri and Apple Intelligence and WWDC26 240/343) A plain AppEntity with a stable id, conforming to Transferable, annotated on the image view with the iOS 27 .appEntityIdentifier(_:) modifier: struct OnScreenImageEntity: AppEntity, Transferable { static let typeDisplayRepresentation = TypeDisplayRepresentation(name: "On-Screen Image") static let defaultQuery = Query() let id: String static var transferRepresentation: some TransferRepresentation { DataRepresentation(exportedContentType: .plainText) { … } // distinctive text DataRepresentation(exportedContentType: .png) { … } // the image } struct Query: EntityQuery { func entities(for ids: [String]) async throws -> [OnScreenImageEntity] { logger.notice("entities(for:) CALLED \(ids)") // <- never fires return ids.filter { store.isCurrent($0) }.map(OnScreenImageEntity.init) } } } // on the view: Image(uiImage: image) .appEntityIdentifier(EntityIdentifier(for: OnScreenImageEntity.self, identifier: id)) What I observe (iOS 27 Beta 3, device) "Describe this image" / "Create a note for this" appear to use an automatic screenshot — the responses reference my app's UI chrome, and EntityQuery.entities(for:) is never called, so my entity's Transferable is not involved at all. "Send this to " doesn't attach the image; Siri says something like "I can't attach the image directly from your screen," which again sounds like a screen grab. entities(for:) is not called. The only flow that resolves my entity is the ChatGPT hand-off: asking Siri about the on-screen content calls entities(for:) (several times). But even there it stalls — Siri responds "could not clarify what you mean by 'about this'… document, image, or topic?", and no Transferable representation is ever read (my export closures never run). So the entity resolves, yet the content is never actually transferred. The older NSUserActivity.appEntityIdentifier route was never consumed at all; only the iOS 27 .appEntityIdentifier(_:) view modifier produced any resolution, and only in the ChatGPT flow above. I also understand from WWDC26 240/343 that the cross-app content move is built on IntentValueRepresentation (entity ↔ a system value type like IntentPerson), which the recipient imports via IntentValueQuery / IntentValueRepresentation(importing:). Since there doesn't seem to be a system value type for an arbitrary image (and IntentFile isn't one), I'm not sure an image entity can participate in that transfer at all. My questions Is .appEntityIdentifier(_:) the intended way to expose a single on-screen item in iOS 27? It only resolves my entity in the ChatGPT hand-off, and even then the Transferable is never read — under what conditions is the resolved entity's Transferable actually consumed? Are on-screen content requests ("describe this", "create a note for this") ever meant to use an app-provided AppEntity + Transferable, or are they always served by screen capture? (For me they never call entities(for:).) Is there a supported path for Siri to send an image from a third-party app's on-screen content to another app? If the transfer requires IntentValueRepresentation and there's no image system value, is a Transferable image representation ever consumed for this — and if so, how is it triggered? If this is simply not supported for image content yet, that's useful to know too, I just want to make sure I'm not missing a required piece (a schema conformance, an eligibility flag, a different annotation API, etc.). I have a minimal sample project that reproduces this (single annotated image, no photo library, logs to a subsystem so you can see entities(for:) never being called) and filed it as Feedback FB23813341 — happy to share details. Thanks!
Replies
4
Boosts
3
Views
182
Activity
2d
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
145
Activity
5d
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
223
Activity
1w
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
245
Activity
1w
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
294
Activity
1w
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
1
Views
148
Activity
1w
Spotlight on finds title attribute (OS27 b3)
Hi, it seems that something in OS27b3 changed regarding Core Spotlight: Whatever I try, Siri and Spotlight only seem to find the text inside the title or displayName attribute. But attributes like textContent or contentDescription or keywords seem to be ignored. Those attributes are still found, when I do a manual search using CSUserQuery or using the AppEntityDefinition.spotlightQuery(_:) in App Intent Testing. I have already filed a Feedback – but wonder whether anyone else is having this issue? FB23635795 Thanks, Friedrich
Replies
2
Boosts
0
Views
196
Activity
2w
Siri AI’s onscreen awareness can’t understand an AppEntity without a schema?
Use Case I’m currently developing , a hiking and cycling app. I’d like to use Siri AI in iOS/watchOS 27 to create an experience like this: While users are recording an activity in app, they can raise their wrist or invoke Siri on iPhone and simply ask: “How much farther to the destination?” “How far have I already gone?” “How much elevation gain is left?” “How far is it to the next waypoint?” … Siri can then answer based on the app’s current workout context. Since there are many metrics like these, and it’s not convenient to look at the screen while cycling or trail running, this could be a really valuable use case if Siri AI can support it. I defined an AppEntity like this, and then associated it with the UI. But I found that Siri AI doesn’t seem to understand this AppEntity. It can only understand the content it can see on the screen, even though I can see that it did execute ToobooWorkoutSessionQuery, the EntityQuery. This screen has multiple tabs. Siri understood the on-screen values such as “Distance: 0.21 mi” and “Remaining Distance: 0.14 mi”, but it didn’t know the data from the other tabs on the same page, such as heart rate, average speed, and so on. So it seems that Siri is directly reading the screen, instead of retrieving the information from the AppEntity I actually provided. Is this because the AppEntity doesn’t use one of the schemas defined by AppSchemaEntity, so Siri AI can’t understand it? App Intents without a schema seem to have a similar issue. If the AppIntent I define is not within one of those schemas, Siri won’t directly execute it either. My current solution: I defined many Intents and Shortcuts. Siri AI’s ability to parse shortcuts seems to be much smarter in the new system, and it can match them quite easily. Also, shortcuts don’t require the app to be in the foreground. However, when talking to Siri, the shortcut phrase has to include the app name, which feels a bit unnatural. For example: “How far have I traveled in xxx app?”
Replies
0
Boosts
0
Views
162
Activity
2w
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
382
Activity
2w
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
268
Activity
2w
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
172
Activity
3w
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
558
Activity
3w
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
266
Activity
3w
iOS 26.5 breaks AppIntents with AppEnums defined in Swift Package
For some reason since iOS 26.5, a ControlWidgetButton or a Button in a widget configured with an AppIntent conforming to OpenIntent fails to receive its AppEnum parameter correctly if the intent and enum are defined inside a shared Swift Package. Tapping the control widget button opens the main application, but it doesn't pass the AppEnum parameter value in, leaving the app on its default screen instead of navigating to the intended view. This was working perfectly in iOS 26.4, where the app would launch and receive the correct enum case from the intent. No code, configuration, or scheme changes were made between the two runs, only the simulator/OS version differs. Has anyone else run into what seems to be a regression on iOS 26.5? I filed feedback with a sample project: FB22848510
Replies
1
Boosts
2
Views
743
Activity
3w
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
292
Activity
3w
iOS 27+26+18: Spotlight only finds title, not textContent nor contentDescription.
Related feedback: FB16995719 This is an old one, that has not been solved in iOS 27. This is very annoying since iOS 27 brings new AI stuff to Spotlight, that can't be used because of this bug. Jennifer has acknowledged this bug during a one-on-one session last year (WWDC25) where we carefully reviewed my code. I simply would like that the app documents content to be indexed. It's simple text that I pass to textContent. ------- try await CSSearchableIndex.default().indexAppEntities([entity]) // How the indexing is called ------- @available(iOS 18, *) /// The IndexedEntity struct DocumentEntity: IndexedEntity, Identifiable { static var typeDisplayRepresentation: TypeDisplayRepresentation { TypeDisplayRepresentation(name: LocalizedStringResource("INTENT_DOCUMENT_DISPLAY_REP")) } static let defaultQuery = DocumentQuery() // A unique identifier for each document let id: NSManagedObjectID let title: String? let thumbnailData: Data? // The document's text to be indexed let textContent: String? let pageCount: Int // A display representation for UI purposes. var displayRepresentation: DisplayRepresentation { DisplayRepresentation( title: "\(title ?? "")", image: thumbnailData == nil ? nil : .init(data: thumbnailData!) // INDEXED successfully through the use of @available(iOS 18, *) struct DocumentEntity: IndexedEntity, Identifiable { static var typeDisplayRepresentation: TypeDisplayRepresentation { TypeDisplayRepresentation(name: LocalizedStringResource("INTENT_DOCUMENT_DISPLAY_REP")) } static let defaultQuery = DocumentQuery() // A unique identifier for each document (for example, your NSManagedObject's objectID). let id: NSManagedObjectID let title: String? let thumbnailData: Data? // The OCR text to be indexed let textContent: String? let pageCount: Int // A display representation for UI purposes. var displayRepresentation: DisplayRepresentation { DisplayRepresentation( title: "\(title ?? "")", image: thumbnailData == nil ? nil : .init(data: thumbnailData!) ) } } ) } } @available(iOS 18, *) extension DocumentEntity { // The attributeSet for Spotlight var attributeSet: CSSearchableItemAttributeSet { let attributeSet = defaultAttributeSet attributeSet.title = title attributeSet.displayName = title // THIS ONE IS INDEXED attributeSet.contentType = UTType.plainText.identifier attributeSet.textContent = textContent // THIS ONE IS **NOT** INDEXED attributeSet.pageCount = NSNumber(integerLiteral: pageCount) // THIS ONE IS INDEXED attributeSet.thumbnailData = thumbnailData attributeSet.creator = Constants.APP_NAME return attributeSet } } Related: https://discussions.apple.com/thread/256061571
Replies
0
Boosts
1
Views
202
Activity
3w
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
199
Activity
3w
DeleteIntent: the singular typeDisplayRepresentation of the AppEntity is used instead of the entities parameter title (plural)
Hello, I'm using a DeleteIntent in my app, but I can't get it to display "Delete {Books}" in the Shortcut apps. It always displays "Delete {Book}". It apparently uses the BookEntity typeDisplayRepresentation instead of using the intent entities parameter title ("Books") in the parameterSummary. For a "normal" AppIntent, the Shortcuts app uses the entities parameter title ("Books") in the parameterSummary. I filed a feedback: FB23451186 Regards, Axel
Replies
0
Boosts
0
Views
190
Activity
3w