In my app, when invoking a Shortcut via Siri, the
application(_:continueUserActivity:restorationHandler:)
method in AppDelegate is called twice.
When I debug, both NSUserActivity objects are identical.
However, when I run the same Shortcut by tapping it manually, the method is only called once as expected.
Has anyone experienced this issue? How can I prevent Siri Shortcuts from delivering the same NSUserActivity twice?
SiriKit
RSS for tagHandle requests for your app’s services from users using Siri or Maps.
Posts under SiriKit tag
41 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
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, experts,
I want to find Siri response window by bundle id and use it for checking or printing, here is my example code:
XCUIDevice.shared.siriService.activate(voiceRecognitionText: "call mom")
let siriApp = XCUIApplication(bundleIdentifier: "***")
// Print out text from siriApp,
// expecte print: "Sorry, I can't make a phone call with your iphone."
Where should I put into ***?
I tried "com.apple.SiriViewService", "com.apple.siri.velocity", "com.apple.springboard' but nothing work
Any suggestion appreciated, thanks!
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
Hi,
I’m developing an app, which just like Clock App, uses multiple counters.
I want to speak Siri commands, such as “Siri, count for one hour”. ‘count’ is the alternative app name.
My AppIntent has a parameter, and Siri understands if I say “Siri, count” and asks for duration in a separate step. It runs fine, but I can’t figure out how to run the command with the duration specified upfront, without any subsequent questions from Siri.
Clock App has this functionality, so it can be done.
//title
//perform()
@Parameter(title: "Duration")
var minutes: Measurement<UnitDuration>
}
I have a struct ShortcutsProvider: AppShortcutsProvider, phrases accept only parameters of type AppEnum or AppEntity.
Topic:
App & System Services
SubTopic:
Automation & Scripting
Tags:
Siri and Voice
SiriKit
App Intents
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
A user can use Siri to display a list of items from my app. When the user touches on an item to open the app - how do I pass that item to the main app so I know which item detail page to display? This is a SwiftUI app.
Hi everyone,
I’m an AI engineer working on autonomous AI agents and exploring ways to integrate them into the Apple ecosystem, especially via Siri and Apple Intelligence.
I was impressed by Apple’s integration of ChatGPT and its privacy-first design, but I’m curious to know:
• Are there plans to support third-party LLMs?
• Could Siri or Apple Intelligence call external AI agents or allow extensions to plug in alternative models for reasoning, scheduling, or proactive suggestions?
I’m particularly interested in building event-driven, voice-triggered workflows where Apple Intelligence could act as a front-end for more complex autonomous systems (possibly local or cloud-based).
This kind of extensibility would open up incredible opportunities for personalized, privacy-friendly use cases — while aligning with Apple’s system architecture.
Is anything like this on the roadmap? Or is there a suggested way to prototype such integrations today?
Thanks in advance for any thoughts or pointers!
Topic:
Machine Learning & AI
SubTopic:
Apple Intelligence
Tags:
SiriKit
Machine Learning
Apple Intelligence
I have a question about the app lifecycle when my app is launched via a Shortcut. I'm adding a INIntent to a Mac app. So my app delegate implements:
- (nullable id)application:(NSApplication *)application handlerForIntent:(INIntent *)intent
Then my custom intent handler implements the two protocol methods -confirmIntentNameHere:completion: and -handleIntentNameHere:completion:
During my testing -applicationDidFinishLaunching: is called before the intent methods, so I can forward methods to my main window controller to perform the shortcut actions, since it's already ready.
....But if this is not always the case, I can still perform them but I'd have to move the code out of the window controller to perform the action "headless" if invoked before my app has built its UI. Just wondering if this is something I should be prepared for.
Thanks in advance.
Was going to add a shortcut to an app via INIntent. I followed the WWDC developer.apple.com/videos/play/wwdc2021/10232/?time=986
Steps:
Created a .intentdefinition file and created an intent.
Added the intent to .intentdefinition and compiled the app.
Import the header file for the custom intent in the AppDelegate MyIntentname.h
Have the AppDelegate conform to the protocol created in the generated code.
Implement: -application:handlerForIntent: and return self (the app delegate)
Run the app.
Open the Shortcuts app and search for the 'shortcut' (according to the WWDC video linked above it should show up in the actions list).
Doesn't show up in the list.
I tried moving the build application out from Debug to my Applications folder to see if that would help the Shortcuts app find it, but it didn't.
Am I missing a step/doing something wrong?
Topic:
App & System Services
SubTopic:
Automation & Scripting
Tags:
Shortcuts
SiriKit
Intents
App Intents
We have implemented Carplay in our voip based project and in this we have implemented Incoming call and chat notification feature for Carplay.
For Carplay we implemented siri.
Siri Object donated Successfully in Notification service Extension when notification didreceive method called.
Donation Code :-
func donateIncomingMessageIntent(sender: String, senderId: String, message: String, messageId: String, userInfo: [AnyHashable: Any],destination:String) {
// Create proper name components
clearAllinteraction()
var nameComponents = PersonNameComponents()
nameComponents.givenName = sender
//unknown
let senderPerson = INPerson(
personHandle: INPersonHandle(value: senderId, type: .unknown),
nameComponents: nameComponents,
displayName: sender,
image: nil,
contactIdentifier: senderId,
customIdentifier: "sender_\(senderId)"
)
let recipientPerson = INPerson(
personHandle: INPersonHandle(value: "me@example.com", type: .emailAddress),
nameComponents: nil,
displayName: "Me",
image: nil,
contactIdentifier: "me_id",
customIdentifier: "user_id"
)
let inMessage = INMessage(
identifier: messageId,
conversationIdentifier: "conversation_\(senderId)",
content: message,
dateSent: Date(),
sender: senderPerson,
recipients: [recipientPerson],
groupName: nil,
messageType: .text
)
let intent = INSearchForMessagesIntent(
recipients: [recipientPerson],
senders: [senderPerson],
searchTerms: [message],
attributes: .unread,
dateTime: nil,
identifiers: [messageId],
notificationIdentifiers: [messageId],
groupNames: ["Messages"]
)
let interaction = INInteraction(intent: intent, response: nil)
interaction.identifier = "message_\(messageId)"
interaction.direction = .incoming // Add direction
DispatchQueue.global(qos: .userInitiated).async {
interaction.donate { error in
if let error = error {
print("❌ Failed to donate INSearchForMessagesIntent: \(error.localizedDescription)")
} else {
print("✅ Donated INSearchForMessagesIntent successfully!")
let intentData: [String: Any] = [
"senderName": sender,
"senderId": senderId,
"message": message,
"messageId": messageId,
"timestamp": Date().timeIntervalSince1970,
"conversationId": "conversation_\(senderId)", // Add conversationId
"destination":destination
]
let defaults = UserDefaults(suiteName: "group.com.chatapp") // 🔁 Use your App Group ID
defaults?.removeObject(forKey: "lastCarPlayIntentData")
defaults?.set(intentData, forKey: "lastCarPlayIntentData")
defaults?.synchronize()
}
}
}
}
Here SenderID is like 3000@abc,2000@abc etc.
In siri ,When we handle INSearchForMessagesIntent at that time all data getting from Userdefaults because without Userdefaults INSearchForMessagesIntent value nil.
Even we enabled announcement using .allowAnnouncement.
We also tried to save same sender in contact Book because sometime siri search contact and not found then may be raise this type of issue.
So we need code level support for read incoming message in carplay when notification comes.
Thank you.
Hi Community,
I'm new on Siri intents and I'm trying to introduce into my App a Siri Intent for Car Commands. The objective is to list into the Apple Maps the Car list of my App. Currently I've created my own target with its corresponding IntentHandlings, but in the .intentdefinition file of my App, I'm not able to find the List Car Intent.
https://developer.apple.com/documentation/sirikit/car-commands
Do I need some auth?
Also I share my info.plist from the IntentExtension.
Thank you very much,
David.
Topic:
App & System Services
SubTopic:
Automation & Scripting
Tags:
Swift
SiriKit
Intents
App Intents
I am building a CarPlay navigation app and I would like it to be as hands free as possible.
I need a better understanding of how Siri can work with CarPlay and if the direction I need to go is using Intents or App Shortcuts.
My goal is to be able to have the user speak to Siri and do things like "open settings" or "zoom in map" and then call a func in my app to do what the user is asking.
Does CarPlay support this? Do I need to use App Intents or App Shortcuts or something else?
I am new to the idea of Siri Shortcuts and App Intents. What I want to do is use Siri to run a function in my app.
Such as saying to Siri Zoom in map and that will then call a function in my app where I can zoom in the map. Similarly, I could say Zoom out map and it would call a function to zoom out my map.
I do not need to share any sort of shortcut with the Shortcuts app.
Can someone please point me in the right direction for what type of intents I need to use for this?
I have a custom intent. When my app is unable to complete the resolution of a parameter within the app extension, I need to be able to continue within the app. I am unable to figure out what the correct objective C syntax is to enable the execution to continue with the app. Here is what I have tried:
completion([[PickWoodIntentResponse init] initWithCode:PickWoodIntentResponseCodeContinueInApp userActivity:nil]);
This results in the following error:
Implicit conversion from enumeration type 'enum PickWoodIntentResponseCode' to different enumeration type 'INAnswerCallIntentResponseCode' (aka 'enum INAnswerCallIntentResponseCode')
I have no idea why it is referring to the enum type of 'INAnswerCallIntentResponseCode' which is unrelated to my app.
I have also tried:
PickWoodIntentResponse *response = [[PickWoodIntentResponse init] initWithCode:PickWoodIntentResponseCodeContinueInApp userActivity:nil];
completion(response);
but that results in 2 errors:
Implicit conversion from enumeration type 'enum PickWoodIntentResponseCode' to different enumeration type 'INAnswerCallIntentResponseCode' (aka 'enum INAnswerCallIntentResponseCode')
and
Incompatible pointer types passing 'PickWoodIntentResponse *' to parameter of type 'INStringResolutionResult *'
The relevant autogenerated code provided to me with the creation of my intent is as follows:
@class PickWoodIntentResponse;
@protocol PickWoodIntentHandling <NSObject>
- (void)resolveVarietyForPickWood:(PickWoodIntent *)intent withCompletion:(void (^)(INStringResolutionResult *resolutionResult))completion NS_SWIFT_NAME(resolveVariety(for:with:)) API_AVAILABLE(ios(13.0), macos(11.0), watchos(6.0));
@end
typedef NS_ENUM(NSInteger, PickWoodIntentResponseCode) {
PickWoodIntentResponseCodeUnspecified = 0,
PickWoodIntentResponseCodeReady,
PickWoodIntentResponseCodeContinueInApp,
PickWoodIntentResponseCodeInProgress,
PickWoodIntentResponseCodeSuccess,
PickWoodIntentResponseCodeFailure,
PickWoodIntentResponseCodeFailureRequiringAppLaunch
}
@interface PickWoodIntentResponse : INIntentResponse
- (instancetype)init NS_UNAVAILABLE;
- (instancetype)initWithCode:(PickWoodIntentResponseCode)code userActivity:(nullable NSUserActivity *)userActivity NS_DESIGNATED_INITIALIZER;
@property (readonly, NS_NONATOMIC_IOSONLY) PickWoodIntentResponseCode code;
@end
Am I overlooking something? What would be the proper syntax to have within the completion block to satisfy the compiler?
I need to elicit the location of the user in the Siri intents and so I call:
override init(){ super.init() self.locationManager=CLLocationManager() self.locationManager.delegate = self; self.locationManager.startUpdatingLocation() self.locationManager.requestWhenInUseAuthorization() }
Still neither
public func locationManagerDidChangeAuthorization(_ manager: CLLocationManager)
nor
public func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation])
are ever called, notwithstanding the presence of the correct entry in the info.plist, the inclusion of the library and the indication of the delegation with:
class IntentHandler: INExtension, INSendMessageIntentHandling, CLLocationManagerDelegate, UISceneDelegate
are ever called.
Is there any problem with CLLocation manager on intents? What would be a big problem as there is no way to share information with the main app!
Hello Apple Developer Community,
I’m working on integrating Siri into my React Native app using native iOS code and bridging to React Native. I’ve followed the necessary steps to set up Siri support, including:
Adding the Siri capability.
Adding Siri usage descriptions in Info.plist.
Using AppIntent and AppShortcutsProvider to define shortcuts.
However, I’m facing the following issues:
Siri Prompts for Confirmation
When a user says a phrase, Siri asks, "Turn on 'MyApp' shortcuts with Siri?" instead of directly recognizing the phrase. Is this expected behavior? If so, how can I reduce friction for users and make the experience more seamless?
Inconsistent Behavior for Existing Users
For users updating to a version with Siri support:
When the app is closed, Siri says, "MyApp hasn't added support for that with Siri."
When the app is open, Siri prompts, "Turn on shortcut for MyApp?" and rest all working fine
Why does Siri not recognize the shortcut when the app is closed, even though the shortcut is defined in AppShortcutsProvider? How can I ensure that Siri recognizes the shortcut regardless of whether the app is open or closed? Other than using AppIntent and AppShortcutsProvider should i try Donating shortcuts(will that helps for updated user case). Please help me on this
I have a chat/search functionality in my app, I want to integrate siri where user can say something "Hey siri! Ask myApp to get latest news" then I want to invoke my search functionality with "get latest news". I see iOS apps like chatGPT and youtube have already achieved this.
I am able to invoke the intent with static phrase which is expecting the parameter, user is able to provide the value when prompted after requestValueDialog. But it is a 2 step process for end user. I want to achieve in a single step.
struct CombinedSiriShortcuts: AppShortcutsProvider {
static var appShortcuts: [AppShortcut] {
return [
AppShortcut(
intent: ShowSpecificNewsArticleIntent(),
phrases: [
"Ask \(.applicationName) to run a query:",
],
shortTitle: "Specific News Article",
systemImageName: "doc.text.fill"
),
AppShortcut(
intent: TestQuery(),
phrases: [
"Ask \(.applicationName) to \(\.$query)",
],
shortTitle: "Test intent",
systemImageName: "doc.text.fill"
),
]
}
}
struct ShowSpecificNewsArticleIntent: AppIntent {
static var title: LocalizedStringResource = "Show Specific News Article"
static var description = IntentDescription(
"Provides details about a specific news article based on its title."
)
@Parameter(title: "Query")
var query: String
@MainActor
func perform() async throws -> some IntentResult & ProvidesDialog & ShowsSnippetView {
print("in show specific intent");
print(query);
return .result(dialog: "view more about: \(query)")
}
}
Topic:
App & System Services
SubTopic:
Automation & Scripting
Tags:
Siri and Voice
SiriKit
App Intents
I have created an AppIntent and added it to shortcuts to be able to read by Siri. When I say the phrase, the Siri intent dialog appears just fine. I have added a custom SwiftUI View inside Siri dialog box with 2 buttons with intents. The callback or handling of those buttons is not working when initiated via Siri. It works fine when I initiate it in shortcuts. I tried using the UIButton without the intent action as well but it did not work. Here is the code.
static let title: LocalizedStringResource = "My Custom Intent"
static var openAppWhenRun: Bool = false
@MainActor
func perform() async throws -> some ShowsSnippetView & ProvidesDialog {
return .result(dialog: "Here are the details of your order"), content: {
OrderDetailsView()
}
}
struct OrderDetailsView {
var body: some View {
HStack {
if #available(iOS 17.0, *) {
Button(intent: ModifyOrderIntent(), label : {
Text("Modify Order")
})
Button(intent: CancelOrderIntent(), label : {
Text("Cancel Order")
})
}
}
}
}
struct ModifyOrderIntent: AppIntent {
static let title: LocalizedStringResource = "Modify Order"
static var openAppWhenRun: Bool = true
@MainActor
func perform() async throws -> some OpensIntent {
// performs the deeplinking to app to a certain page to modify the order
}
}
struct CancelOrderIntent: AppIntent {
static let title: LocalizedStringResource = "Cancel Order"
static var openAppWhenRun: Bool = true
@MainActor
func perform() async throws -> some OpensIntent {
// performs the deeplinking to app to a certain page to cancel the order
}
}
Button(action: {
if let url = URL(string: "myap://open-order") {
UIApplication.shared.open(url)
}
}
Hi, I am currently working on an App Transfer from Company A to Company B but can't find any documentation about what happens to existing Siri Shortcuts working via App Extension intents.
I have separated the rest of the post in 2 sections: one what summarizes my current understanding and the other with some questions and hypotheses. It would be great to have either someone from Apple to answer that, or someone else share their experience and possibly some documentation that I might have missed.
To my understanding, when a new Shortcut is created, it stores the BundleID of the App and of the App Extension to find the application that will execute it afterwards. If I uninstall the App, I can see a message in the Shortcut app that says "This action requires APPNAME but it may not be installed", but I know that after transferring the app the BundleID doesn't change completely, only the team part does. However, it is not possible to test that as this change cannot be done in xCode as far as I know.
Another part that seems to play a role here is the info.plist file, but in my situation, there are no entries related to the BundleID.
All that being said, I am wondering:
Is it possible to perform an app transfer and keep previously created shortcuts working?
Is it possible to test this kind of things without having to perform a transfer? I haven't found a way to change the team part of the Bundle ID
Is there a place in the documentation that takes care of those things in depth?
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
App ID
Bundle ID
SiriKit
App Intents