So I'm developing an ios application which should be showing shortcuts, but its not. I'm not sure how to debug why the functionality isnt working.
Believe I'm correctly calling AppShortcutsProvider's updateAppShortcutParameters, but I dont see any errors in the console showing me a problem.
And in fact, I made a simplified just swift version that works before I tried to integrate it into a more complex project.
But now I'm at a loss as to what is going wrong or what debug tools I can use to figure it out. Any help would be appreciated.
When building my project I see:
025-08-18 14:07:49.371 appintentsmetadataprocessor[57506:35387547] Starting appintentsmetadataprocessor export
2025-08-18 14:07:49.414 appintentsmetadataprocessor[57506:35387547] Writing Metadata.appintents
2025-08-18 14:07:49.414 appintentsmetadataprocessor[57506:35387547] Metadata root: /Users/jpetersen/Library/Developer/Xcode/DerivedData/Unity-iPhone-dtnhxevagfkzsjdavesziaqrwisr/Build/Products/ReleaseForRunning-iphoneos/UnityFramework.framework/Metadata.appintents
AppIntentsSSUTraining (in target 'UnityFramework' from project 'Unity-iPhone')
cd /Users/jpetersen/no_doc_repos/payments_ios_investigation/SpotlightSearch/client/Build
/Applications/Xcode_16.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/appintentsnltrainingprocessor --infoplist-path /Users/jpetersen/Library/Developer/Xcode/DerivedData/Unity-iPhone-dtnhxevagfkzsjdavesziaqrwisr/Build/Products/ReleaseForRunning-iphoneos/UnityFramework.framework/Info.plist --temp-dir-path /Users/jpetersen/Library/Developer/Xcode/DerivedData/Unity-iPhone-dtnhxevagfkzsjdavesziaqrwisr/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/UnityFramework.build/ssu --bundle-id com.unity3d.framework --product-path /Users/jpetersen/Library/Developer/Xcode/DerivedData/Unity-iPhone-dtnhxevagfkzsjdavesziaqrwisr/Build/Products/ReleaseForRunning-iphoneos/UnityFramework.framework --extracted-metadata-path /Users/jpetersen/Library/Developer/Xcode/DerivedData/Unity-iPhone-dtnhxevagfkzsjdavesziaqrwisr/Build/Products/ReleaseForRunning-iphoneos/UnityFramework.framework/Metadata.appintents --archive-ssu-assets
2025-08-18 14:07:49.436 appintentsnltrainingprocessor[57507:35387550] Parsing options for appintentsnltrainingprocessor
2025-08-18 14:07:49.437 appintentsnltrainingprocessor[57507:35387550] Starting AppIntents SSU YAML Generation
2025-08-18 14:07:49.444 appintentsnltrainingprocessor[57507:35387550] Training 'Start ${+applicationName}' for English
2025-08-18 14:07:49.444 appintentsnltrainingprocessor[57507:35387550] Training 'Play ${ShortcutEntity}|Play ${ShortcutEntity} on ${+applicationName}' for English
2025-08-18 14:07:49.444 appintentsnltrainingprocessor[57507:35387550] Training Negative Phrases '' for English
2025-08-18 14:07:49.444 appintentsnltrainingprocessor[57507:35387550] Application name 'UnityFramework' for English
2025-08-18 14:07:49.449 appintentsnltrainingprocessor[57507:35387550] Generated AppIntents SSU YAML files in file:///Users/jpetersen/Library/Developer/Xcode/DerivedData/Unity-iPhone-dtnhxevagfkzsjdavesziaqrwisr/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/UnityFramework.build/ssu/
2025-08-18 14:07:49.449 appintentsnltrainingprocessor[57507:35387550] Copied AppIntents SSU YAML files to file:///Users/jpetersen/Library/Developer/Xcode/DerivedData/Unity-iPhone-dtnhxevagfkzsjdavesziaqrwisr/Build/Products/ReleaseForRunning-iphoneos/UnityFramework.framework/Metadata.appintents/
So I think it should be making the required app intent data :shrug:
Intents
RSS for tagShare intents from within an app to drive system intelligence and show the app's actions in the Shortcuts app.
Posts under Intents tag
89 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I would like to have an AppEntity with a Property that is a Date, which is only the date, not the time. ie the equivalent of 09/14/2025, not 09/14/2025 09:00 UTC
How would I model this? How would I create an EntityPropertyQuery for this? If I add QueryProperties they have the UI in Shortcuts pick a time too.
Thanks!
I donate INPlayMediaIntent to systerm(donate success), but not show in control center
My code is as follows
let mediaItems = mediaItems.map { $0.inMediaItem }
let intent = if #available(iOS 13.0, *) {
INPlayMediaIntent(mediaItems: mediaItems,
mediaContainer: nil,
playShuffled: false,
playbackRepeatMode: .none,
resumePlayback: true,
playbackQueueLocation: .now,
playbackSpeed: nil,
mediaSearch: nil)
} else {
INPlayMediaIntent(mediaItems: mediaItems,
mediaContainer: nil,
playShuffled: false,
playbackRepeatMode: .none,
resumePlayback: true)
}
intent.suggestedInvocationPhrase = "播放音乐"
let interaction = INInteraction(intent: intent, response: nil)
interaction.donate { error in
if let error = error {
print("Intent 捐赠失败: \(error.localizedDescription)")
} else {
print("Intent 捐赠成功 ✅")
}
}
When my Intents extension resolves an INStartCallIntent and returns .continueInApp while the device is locked, the call does not proceed unless the user unlocks the device. After unlocking, the app receives the NSUserActivity and CallKit proceeds normally.
My expectation is that the native CallKit outgoing UI should appear and the call should start without requiring unlock — especially when using AirPods, where attention is not available.
Steps to Reproduce
Pair and connect AirPods.
Lock the iPhone.
Start music playback (e.g. Apple Music).
Place the phone face down (or cover Face ID sensors so attention isn’t available).
Say: “Hey Siri, call Tommy with DiscoMonday(My app name).”
Observed Behavior
Music mutes briefly.
Siri says “Calling Tommy with DiscoMonday.”
Lock screen shows “Require Face ID / passcode.”
After several seconds, music resumes.
The app is not launched, no NSUserActivity is delivered, and no CXStartCallAction occurs.
With the phone face up, the same phrase launches the app, triggers CXStartCallAction, and the call proceeds via CallKit after faceID.
Expected Behavior
From the lock screen, Siri should hand off INStartCallIntent to the app, which immediately requests CXStartCallAction and drives the CallKit UI (reportOutgoingCall(...startedConnectingAt:) → ...connectedAt:), without requiring device unlock, regardless of orientation or attention availability when AirPods are connected.
Topic:
App & System Services
SubTopic:
Automation & Scripting
Tags:
iOS
Siri and Voice
Intents
CallKit
I'm a bit confused as to what we're supposed to be doing to support starting a workout using Siri in iOS/watchOS 26. On one hand, I see a big push to move towards App Intents and shortcuts rather than SiriKit. On the other hand, I see that some of the things I would expect to work with App Intents well... don't work. BUT - I'm also not sure it isn't just developer error on my part.
Here are some assertions that I'm hoping someone more skilled and knowledgable can correct me on:
Currently the StartWorkoutIntent only serves the Action button on the Watch Ultra. It cannot be used to register Shortcuts, nor does Siri respond to it.
I can use objects inherited from AppIntent to create shortcuts, but this requires an additional permission to run a shortcut if a user starts a workout with Siri.
AppIntent shortcuts requires the user to say "Start a workout in " - if the user leaves out the "in " part, Siri will not prompt the user to select my app.
If I want to allow the user to simply say "Start a Workout" and have Siri prompt the user for input as to which app it should use, I must currently use the older SiriKit to do so.
Are these assertions correct - or am I just implementing something incorrectly?
Using the latest Xcode 26 beta for what it is worth.
Topic:
App & System Services
SubTopic:
Health & Fitness
Tags:
Siri and Voice
SiriKit
Intents
App Intents
Hi,
I'm migrating my project from the old .strings files to String Catalogs (.xcstrings files). Everything is migrating over fine except for my custom intents. Right now the localization files for my custom intents all live "under" the definition file like so:
But there is no option to migrate to a string catalog. I even tried removing the localization files, and re-adding them using the "Localize..." button, but that just creates the old .strings files, not the new string catalog.
Is this not supported yet for intents definitions? I can't find any documentation about this. It would be a real shame to have part of my app on string catalogs and this one piece on the old Localizable.strings format.
I'm trying to run sample Trails app from the documentation, unaltered.
When I do the build, I get a
Command ValidateAppShortcutStringsMetadata failed with a nonzero exit code
error. How do I debug this?
I'm trying this on Xcode 16.4.
The execution of the shortcut command is abnormal.
An App Intents was created through xcode, a test example was written, and an exception was executed.
error: couldn`t communicate with a helper application.
log:
Shortcut <WFWorkflow: 0x600003008b40, name: Test, actions: 1> failed with error Error Domain=NSCocoaErrorDomain Code=4097 "connection to service created from an endpoint" UserInfo={NSDebugDescription=connection to service created from an endpoint, WFActionIndex=0}.
-[WFBackgroundShortcutRunner callWorkflowRunningCompletionBlockWithResult:] Workflow Did Finish: Calling Completion Block
-[WFBackgroundShortcutRunner listener:shouldAcceptNewConnection:]_block_invoke XPC connection invalidated
-[WFBackgroundShortcutRunnerStateMachine invalidateWithReason:] connection invalidated/interrupted while finishing shortcut or exiting runner. Exiting should already be in process, not transitioning.
-[WFBackgroundShortcutRunner unaliveProcess]_block_invoke_2 Exiting process
Consider the following in an AppIntent:
struct TestIntent: AppIntent {
static let title: LocalizedStringResource = "Test Intent"
static var parameterSummary: some ParameterSummary {
Summary("Test") {
\.$options
}
}
enum Option: Int, CaseIterable, AppEnum {
case one
case two
case three
case four
case five
case six
static let typeDisplayRepresentation: TypeDisplayRepresentation =
TypeDisplayRepresentation(
name: "Options"
)
static let caseDisplayRepresentations: [Option: DisplayRepresentation] = [
.one: DisplayRepresentation(title: "One"),
.two: DisplayRepresentation(title: "Two"),
.three: DisplayRepresentation(title: "Three"),
.four: DisplayRepresentation(title: "Four"),
.five: DisplayRepresentation(title: "Five"),
.six: DisplayRepresentation(title: "Six"),
]
}
@Parameter(title: "Options", default: [])
var options: [Option]
@MainActor
func perform() async throws -> some IntentResult {
print(options)
return .result()
}
}
In Shortcuts, this will turn into a dropdown where you can check multiple Option values. However, when perform() is called, options will be an empty array regardless of what the user selects. This is observed on both iOS 18.5 and macOS 15.5. However, on iOS 26.0 beta and macOS 26.0 beta, the issue seems to be resolved and options contains all the checked options. However, we do back deploy to current/previous iOS/macOS versions. How can we provide a multiple choice selection of fixed values on these older versions?
I developed a shortcut feature for my app using the AppIntents framework, which can display a maximum of 10 shortcuts in the Shortcuts app. However, I've noticed that apps like Tesla and Porsche have a significantly larger number of shortcuts, far exceeding 10. After searching online, I found that they might be using Intent Extensions and the SiriKit framework. I customized an Intent through SiriKit, checked the option for "Intent is user-configurable in the Shortcuts app" and "Add to Siri." I can find this shortcut when I search for it, but it does not appear on the homepage or under the app category. Is there any way to resolve this?
Hello,
I’m working on integrating SiriKit with my music app using INPlayMediaIntent. My app is live on TestFlight, and the Siri command is being recognized, but mediaItems is always empty in my Intent
Demo Project
When we use the "Find All Reminders" shortcut, there's these two filters "Is Completed and "Is Not Completed".
When I implement this in my app, the best I could get is just "Completed" and "Not Completed", I can't figure out how to add the "Is" in front.
In my entity:
@Property(title: "Completed")
var completed : Bool
In the EntityPropertyQuery:
static var properties = QueryProperties {
Property(\GTDItemAppEntity.$list) {
EqualToComparator { NSPredicate(format: "list.uuid = %@", $0.id as NSUUID) }
}
Property(\GTDItemAppEntity.$text) {
ContainsComparator { NSPredicate(format: "text CONTAINS[cd] %@", $0) }
EqualToComparator { NSPredicate(format: "text = %@", $0) }
}
Property(\GTDItemAppEntity.$completed) {
EqualToComparator { NSPredicate(format: $0 ? "completed = YES" : "completed = NO") }
}
}
If I change the property to
@Property(title: "Is Completed")
var completed : Bool
Then it will show as "Is Completed" and "Not Is Completed" in the filter!
Reminder:
My App:
I'm making an app that can have locations and links shared to it. I have gotten the share intent working for text and urls with:
NSExtensionActivationSupportsWebURLWithMaxCount: 1
NSExtensionActivationSupportsWebPageWithMaxCount: 1
NSExtensionActivationSupportsText: true
in Info.plist of the share extension. I am able to share Google Maps locations and safari websites. However, my app does not appear when I share a location on Apple Maps.
I also tried the other options in the docs (https://developer.apple.com/documentation/bundleresources/information-property-list/nsextension/nsextensionattributes/nsextensionactivationrule) as well without success. When I share a location (i.e. a shop) in Apple Maps, it looks like a link but perhaps its something else?
Does anyone know how to get an app to come up in the share menu of an Apple Maps location?
Thanks!
Hi,
we're having trouble implementing search through Siri voice commands.
We already did it successfully for audio playback using INPlayMediaIntentHandling.
For search, none of the available ways works.
Both INSearchForMediaIntentHandling and ShowInAppSearchResultsIntent never open the App in the first place. We tried various commands, but e.g. "Search for " sometimes opens the Apple Music app and sometimes shows a Google search widget. Our app is never taken into consideration for providing any results.
We implemented all steps mentioned in WWDC videos and documentation (e.g. https://developer.apple.com/documentation/appintents/making-in-app-search-actions-available-to-siri-and-apple-intelligence), but nothing seems to work.
We're mainly testing on iOS 18 currently. Any idea why this is not working?
Topic:
App & System Services
SubTopic:
Automation & Scripting
Tags:
Siri and Voice
SiriKit
Intents
App Intents
Hello! I'm facing a strange behavior on macOS related to Ask Each Time, which works fine on iOS. I've an App Intent that declares a parameter like so:
@Parameter(
title: "Tags",
description: "Tags to add to the link.",
optionsProvider: TagsOptionsProvider()
)
var tags: [String]?
The TagsOptionProvider is like this:
struct TagsOptionsProvider: DynamicOptionsProvider {
@Dependency
private var modelCoordinator: ModelCoordinator
@MainActor
func results() async throws -> [String] {
return modelCoordinator.tags().compactMap { $0.name }
}
}
Now, the issue comes if I create a shortcut where for the tags parameter the user selects the magic variable Ask Each Time. On iOS, when the user is presented with the selector, they can simply tap 'Done' without selecting any value (the user does not want to include any tag). The problem is that on macOS the 'Done' button is disabled if there's no selection. See both behaviors:
iOS:
macOS:
Question:
Is there a way to let macOS continue even if the user doesn't select any of the available options like on iOS? I've tried declaring the tags para meter as Optional (like on the screenshot) and non-optional, both cases show the same behavior.
Environment:
iOS 18.5
macOS 15.5
I'm currently working on enhancing our app’s support for App Intents. We're aiming to suggest time-sensitive shortcuts to Spotlight and Siri — for example, proactively surfacing certain shortcut from 2 hours before some event the user has registered in their database until 2 hour after that.
I’ve been reviewing the AppIntents framework documentation but haven’t found a definitive answer on whether this is currently achievable.
From what we understand, the RelevantIntent and RelevantContext APIs appear to support time-based suggestions, but they seem to apply only to Widgets, not to standalone app shortcuts. Is this understanding correct, and is there a recommended approach for achieving time-sensitive shortcut suggestions outside of a Widget context?
Any guidance would be greatly appreciated.
Best regards,
Hello!
I am excited to try out the new continueInForeground API with iOS 26.
I was wondering, what is the suggested way to transport meta data to the main app?
Before, with SiriKit intents I would use the .onContinueUserActivity() API and were able to pass a NSUserActivity from the Shortcut to the Main app.
Now, with the continueInForeground() call I am not sure – what would be your suggestion?
Of course, I can store some data in UserDefaults, but that feels like a workaround.
Happy to get some input on this!
Thanks a lot and have a great day!
I'm trying to create two widgets, widget A and B.
Currently A and B are very similar so they share the same Intent and Intent Timeline Provider.
I use the Intent Configuration interface to set a parameter, in this example lets say its the background tint.
On one of the widgets, widget A, I want to also set another String enum parameter (for a timescale), but I don't want this option to be there for widget B as it's not relevant.
I'm aware of some of the options for configuring the ParameterSummary, but none that let me pass in or inject the "kind" string (or widget ID) of the widget that's being modified.
I'll try to provide some code for examples.
My Widget Definition (targeting >= iOS 17)
struct WidgetA: Widget {
// I'd like to access this parameter within the intent
let kind: String = "WidgetA"
var body: some WidgetConfiguration {
AppIntentConfiguration(kind: kind, intent: WidgetIntent.self, provider: IntentTimelineProvider()) { entry in
WidgetView(data: entry)
}
.configurationDisplayName("Widget A")
.description("A widget.")
.supportedFamilies([.systemMedium, .systemLarge])
}
}
struct WidgetB: Widget {
let kind: String = "WidgetB"
var body: some WidgetConfiguration {
AppIntentConfiguration(kind: kind, intent: WidgetIntent.self, provider: IntentTimelineProvider()) { entry in
WidgetView(data: entry)
}
.configurationDisplayName("Widget B")
.description("B widget.")
.supportedFamilies([.systemMedium, .systemLarge])
}
}
struct IntentTimelineProvider: AppIntentTimelineProvider {
typealias Entry = WidgetIntentTimelineEntry
typealias Intent = WidgetIntent
........
}
struct WidgetIntent: AppIntent, WidgetConfigurationIntent {
// This intent allows configuration of the widget background
// This intent also allows for the widget to display interactive buttons for changing the Trend Type
static var title: LocalizedStringResource = "Widget Configuration"
static var description = IntentDescription("Description.")
static var isDiscoverable: Bool { return false}
init() {}
init(trend:String) {
self.trend = trend
}
// Used for implementing interactive Widget
func perform() async throws -> some IntentResult {
print("WidgetIntent perform \(trend)")
#if os(iOS)
WidgetState.setState(type: trend)
#endif
return .result()
}
@Parameter(title: "Trend Type", default: "Trend")
var trend:String
// I only want to show this parameter for Widget A and not Widget B
@Parameter(title: "Trend Timescale", default: .week)
var timescale: TimescaleTypeAppEnum?
@Parameter(title: "Background Tint", default: BackgroundTintTypeAppEnum.none)
var backgroundTint: BackgroundTintTypeAppEnum?
static var parameterSummary: some ParameterSummary {
// Summary("Test Info") {
// \.$timescale
// \.$backgroundTint
// }
// An example of a configurable widget parameter summary, but not based of kind/ID string
When(\.$backgroundTint, .equalTo, BackgroundTintTypeAppEnum.none) {
Summary("Test Info") {
\.$timescale
\.$backgroundTint
}
} otherwise : {
Summary("Test Info") {
\.$backgroundTint
}
}
}
}
enum TimescaleTypeAppEnum: String, AppEnum {
case week
case fortnight
static var typeDisplayRepresentation = TypeDisplayRepresentation(name: "Trend Timescale")
static var caseDisplayRepresentations: [Self: DisplayRepresentation] = [
.week: "Past Week",
.fortnight: "Past Fortnight"
]
}
enum BackgroundTintTypeAppEnum: String, AppEnum {
case blue
case none
static var typeDisplayRepresentation = TypeDisplayRepresentation(name: "Background Tint")
static var caseDisplayRepresentations: [Self: DisplayRepresentation] = [
.none: "None (Default)",
.blue: "Blue"
]
}
I know I could achieve what I'm after by having a separate Intent and separate IntentTimelineProvider for each widget. But this all seems unnessecary for just a simple optional parameter based on what widget its configuring.... unless I'm missing the point about Intents, Widgets or something!
I've done a fair bit of other searching but can't find an answer to this overall scenario.
Many thanks for any help.
I am trying to write a unit test for an AppIntent and override the AppDependencyManager so I can inject dependencies for the purposes of testing. When I run a test, the app crashes with:
AppIntents/AppDependencyManager.swift:120: Fatal error: AppDependency of type Int.Type was not initialized prior to access. Dependency values can only be accessed inside of the intent perform flow and within types conforming to _SupportsAppDependencies unless the value of the dependency is manually set prior to access.
App Intent:
import AppIntents
struct TestAppIntent: AppIntent {
@AppDependency var count: Int
static var title: LocalizedStringResource { "Test App Intent "}
func perform() async throws -> some IntentResult {
print("\(count)")
return .result()
}
}
extension TestAppIntent {
init(dependencyManager: AppDependencyManager) {
_count = AppDependency(manager: dependencyManager)
}
}
Unit Test
import Testing
import AppIntents
@testable import AppIntentTesting
struct TestAppIntentTests {
@Test("test")
func test() async throws {
let dependencyManager = AppDependencyManager()
dependencyManager.add(dependency: 5)
let appIntent = TestAppIntent(dependencyManager: dependencyManager)
_ = try await appIntent.perform()
}
}
Hi! I am using the Automations in shortcuts in macOS 26 dev beta 1 and I have all my shortcuts working except this one. Why?(photo included). All the others are very similar except they do other things not make pdf. They work. Why does this one not. I tried changing the extension to .doc, or .docx instead of doc and docx I tried using if name ends in .docx I tried file filtering nothing. Any ideas? Thanks!