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

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
51
3h
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?
0
5
49
7h
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
0
19
9h
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
38
1d
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
26
1d
Is UISceneAppIntent supported in Designed for iPad apps on macOS?
I'm seeing what appears to be different UISceneAppIntent behavior between iOS and Designed for iPad on macOS, and I'd like to confirm whether this is expected. I'm working on an iOS app that defines an AppIntent conforming to UISceneAppIntent from the AppIntents framework. The intent is handled by a scene delegate conforming to both UIWindowSceneDelegate and AppIntentSceneDelegate. On iOS, everything works as expected: If the app is launched for the first time from Shortcuts, the intent is available via connectionOptions.appIntent in scene(_:willConnectTo:options:). If the app is already running, scene(_:willPerformAppIntent:) is called. However, when running the same iOS app on macOS in Designed for iPad mode, the behavior is different: If the app is launched from Shortcuts, connectionOptions.appIntent is always nil in scene(_:willConnectTo:options:). If the app is already running, scene(_:willPerformAppIntent:) is never called, even though the application is successfully activated. Is this expected behavior? I noticed that the AppIntents framework explicitly marks both AppIntentSceneDelegate and UISceneAppIntent as unavailable on macOS: @available(iOS 26.0, tvOS 26.0, *) @available(macOS, unavailable) @available(watchOS, unavailable) public protocol AppIntentSceneDelegate : UISceneDelegate Since the app is running on macOS in Designed for iPad mode and still uses the iOS binary, I wasn't sure whether these scene-based APIs are expected to work in this environment or whether they are intentionally unsupported. Has anyone from Apple or the community been able to confirm whether this behavior is by design, or whether it should be considered a bug? I'd appreciate any clarification.
1
0
93
3d
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?
1
1
95
3d
CSSearchableItem init(appEntity:) crashes on iOS 18.0+
Hello, In my app, I want to create a CSSearchableItem using the initialiser that accepts an appEntity so I can update the item expirationDate when indexing. This initialiser is marked as iOS 18.0+ but as soon as I launch my app, it crashes. I filed a feedback: FB23270394 Can you help? Thank you Axel dyld[62169]: Symbol not found: _$s10AppIntents13IndexedEntityPAAE15hideInSpotlightSbvg Referenced from: <150E43FA-D9F4-3DF3-88C1-86E3DA3B272B> /Users/axel/Library/Developer/CoreSimulator/Devices/2C645A0F-45E5-429E-82EE-0C71D83407E3/data/Containers/Bundle/Application/18F00389-5CE8-49A2-883A-CDA38DDB03C4/Skipper.app/Skipper.debug.dylib Expected in: <F5744EDB-79CF-333C-A49A-8E9C5C3ACD10> /Library/Developer/CoreSimulator/Volumes/iOS_22A3351/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/AppIntents.framework/AppIntents Symbol not found: _$s10AppIntents13IndexedEntityPAAE15hideInSpotlightSbvg Referenced from: <150E43FA-D9F4-3DF3-88C1-86E3DA3B272B> /Users/axel/Library/Developer/CoreSimulator/Devices/2C645A0F-45E5-429E-82EE-0C71D83407E3/data/Containers/Bundle/Application/18F00389-5CE8-49A2-883A-CDA38DDB03C4/Skipper.app/Skipper.debug.dylib Expected in: <F5744EDB-79CF-333C-A49A-8E9C5C3ACD10> /Library/Developer/CoreSimulator/Volumes/iOS_22A3351/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/AppIntents.framework/AppIntents dyld config: DYLD_ROOT_PATH=/Library/Developer/CoreSimulator/Volumes/iOS_22A3351/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.0.simruntime/Contents/Resources/RuntimeRoot DYLD_LIBRARY_PATH=/Users/axel/Library/Developer/Xcode/DerivedData/Skipper-gayhthkwqznqqkeoqazrmncvolcq/Build/Products/Debug-iphonesimulator DYLD_INSERT_LIBRARIES=/Library/Developer/CoreSimulator/Volumes/iOS_22A3351/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libLogRedirect.dylib:/Library/Developer/CoreSimulator/Volumes/iOS_22A3351/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libMainThreadChecker.dylib:/usr/lib/libRPAC.dylib:/Library/Developer/CoreSimulator/Volumes/iOS_22A3351/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libViewDebuggerSupport.dylib DYLD_FRAMEWORK_PATH=/Users/axel/Library/Developer/Xcode/DerivedData/Skipper-gayhthkwqznqqkeoqazrmncvolcq/Build/Products/Debug-iphonesimulator:/Users/axel/Library/Developer/Xcode/DerivedData/Skipper-gayhthkwqznqqkeoqazrmncvolcq/Build/Products/Debug-iphonesimulator/PackageFrameworks DYLD_FALLBACK_FRAMEWORK_PATH=/Library/Developer/CoreSimulator/Volumes/iOS_22A3351/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks DYLD_FALLBACK_LIBRARY_PATH=/Library/Developer/CoreSimulator/Volumes/iOS_22A3351/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib Debug session ended with code 9: killed
1
0
84
5d
AppEnum filtering in Shortcuts
Hello, I have an AppEntity with an EntityQuery that conforms to EnumerableEntityQuery by providing an allEntities() method. This creates a default "Find" action in the Shortcuts app for that entity, including automatic filtering on primitive properties such as dates and numbers. The entity has an AppEnum property. However, the "Find" action returns zero results when filtering by that property – even though the enum value is correctly displayed when using the "View" action on the same entity. Conforming to EntityPropertyQuery and manually defining comparators does fix the enum filtering, but it replaces all of the system-generated filtering, requiring me to reimplement comparators for every property I want to remain filterable. Is this the intended behavior, or is automatic filtering on AppEnum properties something that should be supported out of the box? Sincerely, Holger
0
0
50
5d
Siri AI shows raw TypedValueToContentGraphResolutionErrorDomain error 4 to user
I found a UI/error-handling issue involving Siri AI where a raw/internal-looking error code is shown directly to the user instead of a user-friendly message. Environment: Device: iPad Pro 11-inch (M4) iOS/iPadOS version: 27.0 Siri / Apple Intelligence enabled: Yes App involved: Files & PDF Expert UI/context: Siri AI interaction with a document from Files File type: .doc Observed behavior: I asked Siri AI to create a new note inside a document through the app integration. Instead of completing the request or showing a user-friendly failure message, iOS displayed this raw error notification: “From PDF Expert: The operation couldn’t be completed. (TypedValueToContentGraphResolutionErrorDomain error 4.)” Expected behavior: Siri AI should handle this failure gracefully and explain that it could not create a new note in the document, instead of exposing the raw error domain and error code to the user. Screenshot:
0
0
78
5d
UI Regession for array widget configuration in iOS 27 Beta 1
Not sure if this is an intented change in terms of UI on 27 beta 1, but I think the previous implementation of configuring array of App Entity is better with a list and options and reorder and remove items. My widget configuration code: struct BusWidgetConfiguration: WidgetConfigurationIntent { static var title: LocalizedStringResource { "Bus Stop Configuration" } static var description: IntentDescription { "Configure youe top 3 most commonly used bus stop to open in app." } @Parameter(title: "Bus Stop", default: [], size: IntentCollectionSize(min: 0, max: 3)) var busStops: [BusStopEntity] @Parameter(title: "Open in Maps", default: false) var openInMaps: Bool } iOS 27 Beta 1: iOS 26.5:
1
0
186
5d
visionOS no longer displays App Entities icon in the search results
In visionOS 2, the system search displays the icon of each App Entity registered. It used to work up to visionOS 26 beta 7. But since visionOS 26 beta 8, visionOS 26.x , and still in the current visionOS 27 Beta 2 the system search no longer display the right icon. Instead it displays the icon of an AppShortcut declared by the source code which uses the AppEntities. This does not help the users to find the right AppEntity in a search with multiple results as they all have the same AppShortcut icon. This "bug" also make the search result differ from the experience with iOS and iPadOS which display each AppEntity icon. You can use the Apple sample to see this bug on visionOS 27 Beta 2 and 26. Accelerating app interactions with App Intents AppEntities are an important part of Apple Intelligence, the system integration is really important for a great user experience. FB19915478
0
0
62
5d
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.
1
0
157
6d
Confused about App Intents integration in iOS27
I just watched the "Build Intelligent Siri experiences with App Schemas" and I'm confused about how to integrate my app with the new Apple Intelligence + Siri in iOS27. I think it mentions specifically that Siri needs to adopt App Schemas, and that just adopting App Intents in my app isn't enough for it to integrate with the new Siri. Is that correct? The 'schemas' seem to be a narrow set of specific activities. What if my app's actions (or intents) don't match closely with it? For example, in my app, I have entities like Tags and Contacts. I can 'create tag' as well as 'add tags to a contact' as 2 different App intents. If I'm using just App Intents on their own, would these not map to the new Siri? I can also add a 'task' to a 'contact'. Would that possibly work with Siri? The videos just don't seem to make an effort to explain what is and what isn't possible.
14
7
850
1w
App Intents and Entities without schemas
Hello, the only way to make Siri AI pick up my intent, or action on my intent + entity is that if BOTH use an schema? For example, I have an intent that adopts a schema, but my entity doesn't. That means Siri AI can't do anything with my intent? What if neither use a schema? Siri AI can't do anything with it? I'm asking because schema seems limited to only few domains which I'm not sure how I'll integrate with my apps.
1
1
137
1w
CSSearchableItemAttributeSet.associateAppEntity(_:priority:) causes "Failed to request donation" warning
I'm trying to associate a Core Spotlight item with an AppEntity during indexing by calling CSSearchableItemAttributeSet.associateAppEntity(_:priority:). However, every time I do so, I get the following warning in the console: {CSInlineDonation[async]: "my.app.bundle.identifier" add-update-items:1 delete-items:0}: Failed to request donation Error Domain=CSIndexErrorDomain Code=-1000 "Failed to request donation" UserInfo={NSDebugDescription=Failed to request donation, NSUnderlyingError=0x143f54ae0 {Error Domain=com.apple.CascadeSets.Set Code=3 "Access denied (<BMResource: set/App.Intents.IndexedEntity [CCSetDescriptor - key: sourceIdentifier value: my.app.bundle.identifier]>)" UserInfo={NSLocalizedDescription=Access denied (<BMResource: set/App.Intents.IndexedEntity [CCSetDescriptor - key: sourceIdentifier value: my.app.bundle.identifier]>), NSUnderlyingError=0x143f54ba0 {Error Domain=BMAccessErrorDomain Code=11 "Failed to prepare resource" UserInfo={NSLocalizedDescription=Failed to prepare resource}}}}} The relevant code is: let attributeSet = CSSearchableItemAttributeSet(contentType: .audiovisualContent) let appEntity = VideoAppEntity(...) attributeSet.associateAppEntity(appEntity) The Spotlight item itself is indexed successfully, but the associateAppEntity call appears to fail with an "Access denied" error related to App.Intents.IndexedEntity. Has anyone encountered this before? Are there additional entitlements, App Intents configuration requirements, or indexing prerequisites needed for associateAppEntity(_:priority:) to work correctly?
3
1
180
1w
App Shortcuts Action button default parameter
Hello, I have a question about App Intents and the Action button on iPhone. I have an App Intent that opens the app and navigates to a specific entity, conforming to OpenIntent with a single AppEntity parameter. The entity conforms to EnumerableEntityQuery, and the intent is registered as an App Shortcut via the AppShortcutsProvider. When assigning this shortcut to the Action button in Settings, the system doesn’t prompt the user to select a default entity upfront. Instead, it prompts on every activation, creating friction. In contrast, shortcuts like “Open Note…” and other third-party ones prompt the user for a note to open when setting up the Action button, and its title also includes three dots, indicating a pre-configurable parameter. My shortcut’s title shows no dots. What’s required to make an App Shortcut prompt for a default parameter during Action button setup? Sincerely, Holger
2
0
171
1w
Snippet Views don't render consistently, width not always respected
I've created a Snippet for my iOS app which I want to be able to run from the LockScreen via a Shortcuts widget. All works fine except when I run the shortcut and the App Snippet appears, it doesn't always render the SwiftUI view in the same way. Sometimes the width boundaries are respected and sometimes not. I've tested this on iOS 26.1 and iOS 26.2 beta 3 I think this is a bug but it would be great if anyone could see what I might be doing wrong if it's not. Incase it is a bug I've filed a feedback (FB21076429) and I've created a stripped down sample project showing the issue and added screenshots showing the issue. Basic code to reproduce issue: // Intent.swift // SnippetBug import AppIntents import Foundation import SwiftUI struct SnippetEntryIntent: AppIntent { static let title: LocalizedStringResource = "Open Snippet" static let description = IntentDescription("Shows a snippet.") // Don’t open the app – stay in the snippet surface. static let openAppWhenRun: Bool = false func perform() async throws -> some ShowsSnippetIntent { .result(snippetIntent: TestSnippetIntent()) } } struct TestSnippetIntent: SnippetIntent { static let title: LocalizedStringResource = "Snippet Intent" static let description = IntentDescription("Action from snippet.") @MainActor func perform() async throws -> some IntentResult & ShowsSnippetView { .result(view: SnippetView(model: SnippetModel.shared)) } } @MainActor final class SnippetModel { static let shared = SnippetModel() private init() { } } struct SnippetView: View { let model: SnippetModel var body: some View { HStack { Text("Test Snippet with information") Spacer() Image(systemName: "heart") }.font(.headline) } } struct Shortcuts: AppShortcutsProvider { static var appShortcuts: [AppShortcut] { AppShortcut( intent: SnippetEntryIntent(), phrases: [ "Snippet for \(.applicationName)", "Test Snippet \(.applicationName)" ], shortTitle: "Snippet", systemImageName: "barcode" ) } } You also need these lines in your main App entry point: import AppIntents @main struct SnippetBugApp: App { init() { let model = SnippetModel.shared AppDependencyManager.shared.add(dependency: model) } var body: some Scene { WindowGroup { ContentView() } } } This is correct This is incorrect
2
1
368
1w
Calling .spotlightQuery() using AppIntentsTesting results in a crash on Xcode 27 beta 1
On https://developer.apple.com/documentation/AppIntentsTesting/testing-your-app-intents-code Apple showcases the following example using AppIntentsTesting to query entities indexed in spotlight. For me, calling .spotlightQuery on any entity definition causes a crash. func testAllEventsIndexed() async throws { let eventDef = definitions.entities["EventEntity"] let allIndexed = try await eventDef .spotlightQuery(nil) XCTAssertGreaterThanOrEqual(allIndexed.count, 3) } Crash: expression unexpectedly raised an error: Failed to obtain the result of the distributed invocation after it was executed. Remote threw executionPermissionDenied(requestBundleID: Is anyone else seeing this crash, or is it just me? Thanks!
4
0
140
1w
In Xcode 27 beta 1, widgets no longer respond to selected parameters from WidgetConfigurationIntent
I have a widget that uses a WidgetConfigurationIntent where a user can pick what to display in the widget. This configurable widget works fine in iOS 26, but if the app is built with the iOS 27 SDK / Xcode 27, it no longer will respond to any changes from the parameter, and the default is always shown. Is this behavior a bug, or have there been underlying changes in this area that need new accommodations? Thanks!
2
0
228
1w
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
51
Activity
3h
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
0
Boosts
5
Views
49
Activity
7h
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
0
Views
19
Activity
9h
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
38
Activity
1d
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
26
Activity
1d
Is UISceneAppIntent supported in Designed for iPad apps on macOS?
I'm seeing what appears to be different UISceneAppIntent behavior between iOS and Designed for iPad on macOS, and I'd like to confirm whether this is expected. I'm working on an iOS app that defines an AppIntent conforming to UISceneAppIntent from the AppIntents framework. The intent is handled by a scene delegate conforming to both UIWindowSceneDelegate and AppIntentSceneDelegate. On iOS, everything works as expected: If the app is launched for the first time from Shortcuts, the intent is available via connectionOptions.appIntent in scene(_:willConnectTo:options:). If the app is already running, scene(_:willPerformAppIntent:) is called. However, when running the same iOS app on macOS in Designed for iPad mode, the behavior is different: If the app is launched from Shortcuts, connectionOptions.appIntent is always nil in scene(_:willConnectTo:options:). If the app is already running, scene(_:willPerformAppIntent:) is never called, even though the application is successfully activated. Is this expected behavior? I noticed that the AppIntents framework explicitly marks both AppIntentSceneDelegate and UISceneAppIntent as unavailable on macOS: @available(iOS 26.0, tvOS 26.0, *) @available(macOS, unavailable) @available(watchOS, unavailable) public protocol AppIntentSceneDelegate : UISceneDelegate Since the app is running on macOS in Designed for iPad mode and still uses the iOS binary, I wasn't sure whether these scene-based APIs are expected to work in this environment or whether they are intentionally unsupported. Has anyone from Apple or the community been able to confirm whether this behavior is by design, or whether it should be considered a bug? I'd appreciate any clarification.
Replies
1
Boosts
0
Views
93
Activity
3d
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
1
Boosts
1
Views
95
Activity
3d
CSSearchableItem init(appEntity:) crashes on iOS 18.0+
Hello, In my app, I want to create a CSSearchableItem using the initialiser that accepts an appEntity so I can update the item expirationDate when indexing. This initialiser is marked as iOS 18.0+ but as soon as I launch my app, it crashes. I filed a feedback: FB23270394 Can you help? Thank you Axel dyld[62169]: Symbol not found: _$s10AppIntents13IndexedEntityPAAE15hideInSpotlightSbvg Referenced from: <150E43FA-D9F4-3DF3-88C1-86E3DA3B272B> /Users/axel/Library/Developer/CoreSimulator/Devices/2C645A0F-45E5-429E-82EE-0C71D83407E3/data/Containers/Bundle/Application/18F00389-5CE8-49A2-883A-CDA38DDB03C4/Skipper.app/Skipper.debug.dylib Expected in: <F5744EDB-79CF-333C-A49A-8E9C5C3ACD10> /Library/Developer/CoreSimulator/Volumes/iOS_22A3351/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/AppIntents.framework/AppIntents Symbol not found: _$s10AppIntents13IndexedEntityPAAE15hideInSpotlightSbvg Referenced from: <150E43FA-D9F4-3DF3-88C1-86E3DA3B272B> /Users/axel/Library/Developer/CoreSimulator/Devices/2C645A0F-45E5-429E-82EE-0C71D83407E3/data/Containers/Bundle/Application/18F00389-5CE8-49A2-883A-CDA38DDB03C4/Skipper.app/Skipper.debug.dylib Expected in: <F5744EDB-79CF-333C-A49A-8E9C5C3ACD10> /Library/Developer/CoreSimulator/Volumes/iOS_22A3351/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/AppIntents.framework/AppIntents dyld config: DYLD_ROOT_PATH=/Library/Developer/CoreSimulator/Volumes/iOS_22A3351/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.0.simruntime/Contents/Resources/RuntimeRoot DYLD_LIBRARY_PATH=/Users/axel/Library/Developer/Xcode/DerivedData/Skipper-gayhthkwqznqqkeoqazrmncvolcq/Build/Products/Debug-iphonesimulator DYLD_INSERT_LIBRARIES=/Library/Developer/CoreSimulator/Volumes/iOS_22A3351/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libLogRedirect.dylib:/Library/Developer/CoreSimulator/Volumes/iOS_22A3351/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libMainThreadChecker.dylib:/usr/lib/libRPAC.dylib:/Library/Developer/CoreSimulator/Volumes/iOS_22A3351/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libViewDebuggerSupport.dylib DYLD_FRAMEWORK_PATH=/Users/axel/Library/Developer/Xcode/DerivedData/Skipper-gayhthkwqznqqkeoqazrmncvolcq/Build/Products/Debug-iphonesimulator:/Users/axel/Library/Developer/Xcode/DerivedData/Skipper-gayhthkwqznqqkeoqazrmncvolcq/Build/Products/Debug-iphonesimulator/PackageFrameworks DYLD_FALLBACK_FRAMEWORK_PATH=/Library/Developer/CoreSimulator/Volumes/iOS_22A3351/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks DYLD_FALLBACK_LIBRARY_PATH=/Library/Developer/CoreSimulator/Volumes/iOS_22A3351/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 18.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib Debug session ended with code 9: killed
Replies
1
Boosts
0
Views
84
Activity
5d
AppEnum filtering in Shortcuts
Hello, I have an AppEntity with an EntityQuery that conforms to EnumerableEntityQuery by providing an allEntities() method. This creates a default "Find" action in the Shortcuts app for that entity, including automatic filtering on primitive properties such as dates and numbers. The entity has an AppEnum property. However, the "Find" action returns zero results when filtering by that property – even though the enum value is correctly displayed when using the "View" action on the same entity. Conforming to EntityPropertyQuery and manually defining comparators does fix the enum filtering, but it replaces all of the system-generated filtering, requiring me to reimplement comparators for every property I want to remain filterable. Is this the intended behavior, or is automatic filtering on AppEnum properties something that should be supported out of the box? Sincerely, Holger
Replies
0
Boosts
0
Views
50
Activity
5d
Siri AI shows raw TypedValueToContentGraphResolutionErrorDomain error 4 to user
I found a UI/error-handling issue involving Siri AI where a raw/internal-looking error code is shown directly to the user instead of a user-friendly message. Environment: Device: iPad Pro 11-inch (M4) iOS/iPadOS version: 27.0 Siri / Apple Intelligence enabled: Yes App involved: Files & PDF Expert UI/context: Siri AI interaction with a document from Files File type: .doc Observed behavior: I asked Siri AI to create a new note inside a document through the app integration. Instead of completing the request or showing a user-friendly failure message, iOS displayed this raw error notification: “From PDF Expert: The operation couldn’t be completed. (TypedValueToContentGraphResolutionErrorDomain error 4.)” Expected behavior: Siri AI should handle this failure gracefully and explain that it could not create a new note in the document, instead of exposing the raw error domain and error code to the user. Screenshot:
Replies
0
Boosts
0
Views
78
Activity
5d
UI Regession for array widget configuration in iOS 27 Beta 1
Not sure if this is an intented change in terms of UI on 27 beta 1, but I think the previous implementation of configuring array of App Entity is better with a list and options and reorder and remove items. My widget configuration code: struct BusWidgetConfiguration: WidgetConfigurationIntent { static var title: LocalizedStringResource { "Bus Stop Configuration" } static var description: IntentDescription { "Configure youe top 3 most commonly used bus stop to open in app." } @Parameter(title: "Bus Stop", default: [], size: IntentCollectionSize(min: 0, max: 3)) var busStops: [BusStopEntity] @Parameter(title: "Open in Maps", default: false) var openInMaps: Bool } iOS 27 Beta 1: iOS 26.5:
Replies
1
Boosts
0
Views
186
Activity
5d
visionOS no longer displays App Entities icon in the search results
In visionOS 2, the system search displays the icon of each App Entity registered. It used to work up to visionOS 26 beta 7. But since visionOS 26 beta 8, visionOS 26.x , and still in the current visionOS 27 Beta 2 the system search no longer display the right icon. Instead it displays the icon of an AppShortcut declared by the source code which uses the AppEntities. This does not help the users to find the right AppEntity in a search with multiple results as they all have the same AppShortcut icon. This "bug" also make the search result differ from the experience with iOS and iPadOS which display each AppEntity icon. You can use the Apple sample to see this bug on visionOS 27 Beta 2 and 26. Accelerating app interactions with App Intents AppEntities are an important part of Apple Intelligence, the system integration is really important for a great user experience. FB19915478
Replies
0
Boosts
0
Views
62
Activity
5d
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
1
Boosts
0
Views
157
Activity
6d
Confused about App Intents integration in iOS27
I just watched the "Build Intelligent Siri experiences with App Schemas" and I'm confused about how to integrate my app with the new Apple Intelligence + Siri in iOS27. I think it mentions specifically that Siri needs to adopt App Schemas, and that just adopting App Intents in my app isn't enough for it to integrate with the new Siri. Is that correct? The 'schemas' seem to be a narrow set of specific activities. What if my app's actions (or intents) don't match closely with it? For example, in my app, I have entities like Tags and Contacts. I can 'create tag' as well as 'add tags to a contact' as 2 different App intents. If I'm using just App Intents on their own, would these not map to the new Siri? I can also add a 'task' to a 'contact'. Would that possibly work with Siri? The videos just don't seem to make an effort to explain what is and what isn't possible.
Replies
14
Boosts
7
Views
850
Activity
1w
App Intents and Entities without schemas
Hello, the only way to make Siri AI pick up my intent, or action on my intent + entity is that if BOTH use an schema? For example, I have an intent that adopts a schema, but my entity doesn't. That means Siri AI can't do anything with my intent? What if neither use a schema? Siri AI can't do anything with it? I'm asking because schema seems limited to only few domains which I'm not sure how I'll integrate with my apps.
Replies
1
Boosts
1
Views
137
Activity
1w
CSSearchableItemAttributeSet.associateAppEntity(_:priority:) causes "Failed to request donation" warning
I'm trying to associate a Core Spotlight item with an AppEntity during indexing by calling CSSearchableItemAttributeSet.associateAppEntity(_:priority:). However, every time I do so, I get the following warning in the console: {CSInlineDonation[async]: "my.app.bundle.identifier" add-update-items:1 delete-items:0}: Failed to request donation Error Domain=CSIndexErrorDomain Code=-1000 "Failed to request donation" UserInfo={NSDebugDescription=Failed to request donation, NSUnderlyingError=0x143f54ae0 {Error Domain=com.apple.CascadeSets.Set Code=3 "Access denied (<BMResource: set/App.Intents.IndexedEntity [CCSetDescriptor - key: sourceIdentifier value: my.app.bundle.identifier]>)" UserInfo={NSLocalizedDescription=Access denied (<BMResource: set/App.Intents.IndexedEntity [CCSetDescriptor - key: sourceIdentifier value: my.app.bundle.identifier]>), NSUnderlyingError=0x143f54ba0 {Error Domain=BMAccessErrorDomain Code=11 "Failed to prepare resource" UserInfo={NSLocalizedDescription=Failed to prepare resource}}}}} The relevant code is: let attributeSet = CSSearchableItemAttributeSet(contentType: .audiovisualContent) let appEntity = VideoAppEntity(...) attributeSet.associateAppEntity(appEntity) The Spotlight item itself is indexed successfully, but the associateAppEntity call appears to fail with an "Access denied" error related to App.Intents.IndexedEntity. Has anyone encountered this before? Are there additional entitlements, App Intents configuration requirements, or indexing prerequisites needed for associateAppEntity(_:priority:) to work correctly?
Replies
3
Boosts
1
Views
180
Activity
1w
App Shortcuts Action button default parameter
Hello, I have a question about App Intents and the Action button on iPhone. I have an App Intent that opens the app and navigates to a specific entity, conforming to OpenIntent with a single AppEntity parameter. The entity conforms to EnumerableEntityQuery, and the intent is registered as an App Shortcut via the AppShortcutsProvider. When assigning this shortcut to the Action button in Settings, the system doesn’t prompt the user to select a default entity upfront. Instead, it prompts on every activation, creating friction. In contrast, shortcuts like “Open Note…” and other third-party ones prompt the user for a note to open when setting up the Action button, and its title also includes three dots, indicating a pre-configurable parameter. My shortcut’s title shows no dots. What’s required to make an App Shortcut prompt for a default parameter during Action button setup? Sincerely, Holger
Replies
2
Boosts
0
Views
171
Activity
1w
Snippet Views don't render consistently, width not always respected
I've created a Snippet for my iOS app which I want to be able to run from the LockScreen via a Shortcuts widget. All works fine except when I run the shortcut and the App Snippet appears, it doesn't always render the SwiftUI view in the same way. Sometimes the width boundaries are respected and sometimes not. I've tested this on iOS 26.1 and iOS 26.2 beta 3 I think this is a bug but it would be great if anyone could see what I might be doing wrong if it's not. Incase it is a bug I've filed a feedback (FB21076429) and I've created a stripped down sample project showing the issue and added screenshots showing the issue. Basic code to reproduce issue: // Intent.swift // SnippetBug import AppIntents import Foundation import SwiftUI struct SnippetEntryIntent: AppIntent { static let title: LocalizedStringResource = "Open Snippet" static let description = IntentDescription("Shows a snippet.") // Don’t open the app – stay in the snippet surface. static let openAppWhenRun: Bool = false func perform() async throws -> some ShowsSnippetIntent { .result(snippetIntent: TestSnippetIntent()) } } struct TestSnippetIntent: SnippetIntent { static let title: LocalizedStringResource = "Snippet Intent" static let description = IntentDescription("Action from snippet.") @MainActor func perform() async throws -> some IntentResult & ShowsSnippetView { .result(view: SnippetView(model: SnippetModel.shared)) } } @MainActor final class SnippetModel { static let shared = SnippetModel() private init() { } } struct SnippetView: View { let model: SnippetModel var body: some View { HStack { Text("Test Snippet with information") Spacer() Image(systemName: "heart") }.font(.headline) } } struct Shortcuts: AppShortcutsProvider { static var appShortcuts: [AppShortcut] { AppShortcut( intent: SnippetEntryIntent(), phrases: [ "Snippet for \(.applicationName)", "Test Snippet \(.applicationName)" ], shortTitle: "Snippet", systemImageName: "barcode" ) } } You also need these lines in your main App entry point: import AppIntents @main struct SnippetBugApp: App { init() { let model = SnippetModel.shared AppDependencyManager.shared.add(dependency: model) } var body: some Scene { WindowGroup { ContentView() } } } This is correct This is incorrect
Replies
2
Boosts
1
Views
368
Activity
1w
Calling .spotlightQuery() using AppIntentsTesting results in a crash on Xcode 27 beta 1
On https://developer.apple.com/documentation/AppIntentsTesting/testing-your-app-intents-code Apple showcases the following example using AppIntentsTesting to query entities indexed in spotlight. For me, calling .spotlightQuery on any entity definition causes a crash. func testAllEventsIndexed() async throws { let eventDef = definitions.entities["EventEntity"] let allIndexed = try await eventDef .spotlightQuery(nil) XCTAssertGreaterThanOrEqual(allIndexed.count, 3) } Crash: expression unexpectedly raised an error: Failed to obtain the result of the distributed invocation after it was executed. Remote threw executionPermissionDenied(requestBundleID: Is anyone else seeing this crash, or is it just me? Thanks!
Replies
4
Boosts
0
Views
140
Activity
1w
In Xcode 27 beta 1, widgets no longer respond to selected parameters from WidgetConfigurationIntent
I have a widget that uses a WidgetConfigurationIntent where a user can pick what to display in the widget. This configurable widget works fine in iOS 26, but if the app is built with the iOS 27 SDK / Xcode 27, it no longer will respond to any changes from the parameter, and the default is always shown. Is this behavior a bug, or have there been underlying changes in this area that need new accommodations? Thanks!
Replies
2
Boosts
0
Views
228
Activity
1w