Handle requests for your app’s services from users using Siri or Maps.

SiriKit Documentation

Posts under SiriKit tag

42 Posts
Sort by:
Post not yet marked as solved
2 Replies
1.1k Views
Using SiriKit's Car Command Intents (INGetCarLockStatusIntent, INSetCarLockStatusIntent),we are developing SiriKit extension which responds to open and close car door commands from Apple Watch.However, we do not know how to implement the communication between car and Apple Watch. In particular,We do not know whether inter-device communication is possible via "Watch Connectivity Framework".We knows that connection via BLE is not supported from Apple's documents.NG : [Watch SiriKit Extension] --- (BLE) --- [Car]We knows that connection via WIFI is supported from those documents.OK : [Watch SiriKit Extension] --- (HTTP Connection) --- [Car]However, we do not know whether the extension is possible to connect iPhone companion application via "Watch Connectivity Framework" .??? : [Watch SiriKit Extension] --- (Watch Connectivity Framework) --- [iPhone] --- (BLE) --- [Car]We would like to know if there is only a way to connect via WIFI, or even via "Watch Connectivity Framework".
Posted
by
Post not yet marked as solved
1 Replies
673 Views
Hello,I notice this "Book rides and report their status." under SiriKit. Is it possible for car rentals as well? Does this fall under the same category? I.e. implementing this in a car rental app similar to Enterprise instead of apps like Lyft or Uber.
Posted
by
Post not yet marked as solved
1 Replies
1.1k Views
Hi there,We're working on a companion watchOS app for our main Application. The main app has already Siri Extension support and it works quite well: we are able to disambiguate our requests and let the INIntent open the main app once we've a correctly identified request.We saw that watchOS also has support for Siri and Siri extensions in a stand-alone way. Our idea was to port most of the work done with iOS onto watchOS.- Let's assume that the working iOS siri extension is called: SiriExtension. It handles quite well the siri interaction from the iPhone and it allows to open our main app into the specified task and/or do some work in the background. No issues here.- Let's assume, also, that the watchOS siri extension we are working on is called: SiriWatchExtension. It should replicate the work done by its counterpart on iOS, but on watchOS and without a direct interaction with the iOS device: just like a stand-alone app.What's unclear to us is how watchOS and Siri extensions works in respect to the counter part on iOS. Specifically:- We all know that, if we exclude some specific special apps, the main interaction with Siri is done with INIntents donations and Shortcut (pretty much like SoupChef example).- We couldn't see a clear way to add Shortcuts from the watchOS app. Seems that the Shortcuts from iOS are "magically" available also on watchOS, but that is somewhat "unidirectional". - The shortcut that we invoke from the watchOS is triggering the IntentHandler from iOS, not the one we built into watchOS. Is this an intended behaviour? Are we missing something?- Is there a way to donate an intent from watchOS to Shortcut and let this intent trigger just only when we're talking with our watch device?- Also, is there a way to complete an action into the watch app other then the iOS app?Many thanks for the patience, and sorry again for the very long post.--c.
Posted
by
Post not yet marked as solved
1 Replies
551 Views
Hi!Currently I'm experimenting with building an iOS app that allows a motorist (app user) to do the following;Activate the app by using Siri Shortcut;Open up a specific ViewController within the app;Start a record session automatically and record speech from the user by using the AVAudioRecorder;Stop record session automatically when the users stopped speaking;Upload the recording.Now, I found out that when the user has its iPhone connected to CarPlay, Siri doesn't allow users to open an app that doesn't have CarPlay support. Following this finding I have two questions:Is there a workaround to activate/open an app with Siri, while it doesn't have CarPlay support?Is there a way to use AVAudioRecorder in order to achieve the goal to let the user record his speech, within CarPlay?Thanks!Luc.
Posted
by
Post not yet marked as solved
7 Replies
3.1k Views
iOS 14 introduced EV routing in the Maps app as seen in the keynote. I maintain an EV app that currently conforms to INGetCarPowerLevelStatusIntent to provide updates via Siri about car power levels, charging and range. iOS 14 introduced a lot of new methods including things like chargingFormulaArguments all of which have no documentation. I'm unable to get the maps app to suggest EV charge points when plotting routes (I'm using the example they showed in the keynote plotting a long route through California). It also introduces INListCarsIntent which I assume is supposed to be called by maps to figure out what vehicles the user might use for a journey. Again, I've implemented all the methods I can find and it's never triggered when using Maps. Is it simply the case that this functionality just flat out isn't enabled yet and doesn't work or am I doing something wrong? The complete lack of documentation is making it very hard to guess how to use these and I'd really love to get it all functioning ready for the launch of iOS 14. Any help/documentation/guidance massively appreciated here.
Posted
by
Post not yet marked as solved
12 Replies
9.2k Views
I had to create a separate thread for the problem I'm facing with WidgetKit. Environment: Xcode 12.0.1 iOS 14.0 App targeting iOS 10 Widget targeting iOS 14 Intents Extension targeting iOS 10 • I have created Intents Extension. • Created Intents Definition file in Widget target, added it to all the three targets (app, widget, intents extension).  • Declared conformance to the intent handling protocol in IntentHandler (Intents Extension). • Set up Intent Timeline Provider in Widget target.  • Added Siri to the app capabilities. If I go to Edit widget -> tap on a dynamic option it says: No options were provided for this parameter. Intents Extension provides data, but I'm not sure how iOS wires the Intents Extension and widget. From what I see I'm sure that my code inside IntentsHandler.swift is never called.
Posted
by
Post not yet marked as solved
1 Replies
872 Views
I was trying out SiriKit Media Intents and found that with iOS 14, Media Intents can be handled in-app instead of using an extension. Given my current project structure, in-app intent handling suits my purpose better than handling it in an extension. But my question is about how this intent will be handled in a watchOS app? Is in-app Intent Handling supported on watchOS as well (if yes, are there any examples that I can refer to)? If not, can I create an extension for Media Intents and trigger it for watchOS while triggering the in-app handling for iOS alone? Please share if I have missed to read through some documentation / reference that solves this problem.
Posted
by
Post not yet marked as solved
6 Replies
5.8k Views
Issue Summary Hi all, I'm working on an Intents Extension for my app, however when I try to run an intent, Xcode pops up the following error: Could not attach to pid: "965" attach failed (Not allowed to attach to process. Look in the console messages (Console.app), near the debugserver entries, when the attach failed. The subsystem that denied the attach permission will likely have logged an informative message about why it was denied.) An image of the error: This only happens when I try debugging the Intent Extension. Running the main app target or another extension target (e.g. notifications) doesn't produce this error. Build Setup Here are the details of my build setup: Mac Mini M1 Xcode 13 Building to iPhone 11 Pro Max, iOS 15.0.2. I've also tried building to my iPad Pro 12.9 w/ iOS 15.1 and hit the same issue. Things I've tried: Make sure "Debug executable" is unchecked in the scheme I've tried changing the Launch setting to "Automatic" and "Wait for the executable to be launched" I've made sure to run sudo DevToolsSecurity -enable on my mac Rebooted iPhone devices + mac mini Uninstalled / reinstalled the app Deleted derived data Removing / reinstalling the development certs in my keychain --> this actually seemed to work initially, but then the problem came back and now it doesn't work anymore. Console Logs I've looked at the console logs while this error occurs to see if it can shed light on the issue. Here are the ones that seemed notable to me. These logs seem to show that Siri is trying to save / write to a file that it does not have access too. Seems very suspicious error 11:42:38.341470-0800 kernel System Policy: assistantd(31) deny(1) file-read-metadata /private/var/mobile/Library/com.apple.siri.inference error 11:42:38.342204-0800 assistantd failed to save contact runtime data. error=Error Domain=NSCocoaErrorDomain Code=512 "The file “com.apple.siri.inference” couldn’t be saved in the folder “Library”." UserInfo={NSFilePath=/var/mobile/Library/com.apple.siri.inference, NSUnderlyingError=0x100fb03a0 {Error Domain=NSPOSIXErrorDomain Code=5 "Input/output error"}} error 11:42:38.342403-0800 assistantd InferenceError<errorId=crSaveToRunTimeDBFailed file=/Library/Caches/com.apple.xbs/Sources/SiriInference/SiriInference-3100.49.3.1.2/SiriInference/SiriInference/ContactResolver/ContactResolver.swift function=logRunTimeData(runTimeData:config:) line=378 msg=> error 11:42:38.465702-0800 kernel 1 duplicate report for System Policy: assistantd(31) deny(1) file-read-metadata /private/var/mobile/Library/com.apple.siri.inference Looking for "debugserver" entries, like the error suggests, shows these logs: default 11:42:44.814362-0800 debugserver error: [LaunchAttach] MachTask::TaskPortForProcessID task_for_pid(965) failed: ::task_for_pid ( target_tport = 0x0203, pid = 965, &task ) => err = 0x00000005 ((os/kern) failure) default 11:42:44.814476-0800 debugserver 10 +0.011525 sec [03c6/0103]: error: ::task_for_pid ( target_tport = 0x0203, pid = 965, &task ) => err = 0x00000005 ((os/kern) failure) err = ::task_for_pid ( target_tport = 0x0203, pid = 965, &task ) => err = 0x00000005 ((os/kern) failure) (0x00000005) default 11:42:44.825704-0800 debugserver error: MachTask::StartExceptionThread (): task invalid, exception thread start failed. default 11:42:44.825918-0800 debugserver error: [LaunchAttach] END (966) MachProcess::AttachForDebug failed to start exception thread attaching to pid 965: unable to start the exception thread default 11:42:44.826025-0800 debugserver error: Attach failed default 11:42:44.828923-0800 debugserver error: Attach failed: "Not allowed to attach to process. Look in the console messages (Console.app), near the debugserver entries, when the attach failed. The subsystem that denied the attach permission will likely have logged an informative message about why it was denied.". I've also attached the full details of the error below via a text file if it helps. Any help with this issue would be great, and I'm happy to provide more information if needed. Thanks in advance! Xcode Attach Full Error Details
Posted
by
Post not yet marked as solved
5 Replies
1.9k Views
Hi, according this WWDC session https://developer.apple.com/wwdc22/10170 App Shortcuts are defined in Swift code, by implementing the AppShortcutsProvider protocol. To implement the protocol, I'll simply create a single getter that returns all the app shortcuts I want to set up for the user. Note that in total, your app can have a maximum of 10 app shortcuts. However, most apps only need a few. there is a limit for up to 10 AppShortcuts. Could you please clarify how that limit handled? 🤔 (e.g. project failed to build / app will crash or malfunction / only 10 shortcuts will be handled on random/ordered choice by iOS) I suppose there is some way to manage shortcuts amount but see no details at documentation yet.
Posted
by
Post not yet marked as solved
1 Replies
947 Views
Hi, The "Siri &amp; Search" option is listed in my app's settings and I'd like to know how to remove it. I'm pretty sure it wasn't listed when I first started developing my app over a year ago and I never added any Siri related entitlements to my app, not sure when it started being there. It seems half of the apps on my device (from other developers) have this listed, other half do not, so it's not there by default. I've checked my entitlements file, nothing related to Siri. Checked capabilities, nothing there either related to Siri. I know my users could go and manually block the app's data from being accessible but I'd rather remove the option entirely and definitely don't want it on by default. Shows up on at least iOS 15 and iOS 16. Thanks! Colin
Posted
by
Post not yet marked as solved
1 Replies
1.1k Views
My app has a Siri Shortcut with a single parameter that Siri asks for each time the shortcut is run (built using an intentdefinition file). The shortcut works fine when I execute it from the Shortcuts app on my phone, but beginning with iOS 16.4, when I activate it by voice, Siri prompts me for the parameter and after I respond Siri says: "Sorry, could you say that again?". If I repeat the input, it just does a web search. This issue has been reported to us by several users. I was able to reproduce the issue with the build of our app from the App Store (built with Xcode 14.2) and with a local build of the app created with Xcode 14.3. When I run the intent in the debugger, the resolution method for the parameter gets called with an empty array for the parameter and we return [INStringResolutionResult needsValue]. Then Siri asks for the input and after I respond, Siri says "Sorry, could you say that again?"and the line Program ended with exit code: 15 is printed in the console. Is anyone else running into this? Is there anything else I can do to debug this?
Posted
by
Post marked as solved
1 Replies
626 Views
I am working on a swiftui with sirikit. Intent and IntentUI. Often find that the IntentUI is not working. It shows only the default screen and bring user into the app. But not the customized IntentUI. I find that many developers online those worked on siri also have similar problem. Want to know is there a promising way that it will show the customized UI Everytime with siri input (come from shortcuts). And I often find that it works last time i checked it. And then after I worked on other functionalies (which are inrelevant to siri) and come back, the siri IntentUI doesn't work again. This is frustrating. Any clue? Thanks. Attached image is the default UI shown, which means the IntentUI didn't work.
Posted
by
Post not yet marked as solved
1 Replies
651 Views
I have implemented a code that answers my question with Siri, but I want to have a continuous conversation like in ChatGPT app. Can't understand documentation properly to do that. import AppIntents @available(iOS 16.0, *) struct MyAppShortcuts: AppShortcutsProvider { static var appShortcuts: [AppShortcut] { AppShortcut( intent: AskQuestionIntent(), phrases: [ "Ask \(.applicationName)", "Ask \(.applicationName) a question" ] ) } } @available(iOS 16, *) struct AskQuestionIntent: AppIntent { static var title: LocalizedStringResource = "Ask question" static var description = IntentDescription("Ask questions directly") @Parameter(title: "Question", requestValueDialog: "What would you like to ask?") var question: String @MainActor func perform() async throws -> some OpensIntent { return .result(opensIntent: self, dialog: IntentDialog(stringLiteral: "some result")) } } Here is How it looks like in ChatGPT: And here is my app: `
Posted
by
Post not yet marked as solved
1 Replies
615 Views
I have a Driving Task CarPlay entitlement. While connected to CarPlay, I can ask Siri to open any of the apps on the CarPlay Console. Granted, I suspect none of the apps I have fall under Driving Task entitlements. Audible, Audio Books and Music would likely be Audio apps. WhatsApp and Telegram will be Communication, Waze and Maps will be Navigation. I have SiriKit intents to do various tasks in the app. When I use Siri and issue those commands, they all work, regardless of whether I'm connected to CarPlay or Not. What baffles me is that I can't ask Siri to simply open my app on the CarPlay console. She keeps responding with “Sorry, I can’t do that while you’re driving.” I've read through the CarPlay App Programming Guide. The guide mentions the following: All voice interaction must be handled using SiriKit (with the exception of CarPlay navigation apps) Under additional guidelines for communication apps, it mentions that your app must support VOIP calling features via specific SiriKit intents. Under additional guidelines for navigation apps, they mention that voice control must be limited to navigation features. I don't see any special mention of voice control related to Driving Task apps. When I ask Siri to open my app on the iPhone, it just happens. I didn't have to do anything specifically to have this functionality. Why can't I open my app with Siri on the CarPlay console?
Posted
by
Post not yet marked as solved
1 Replies
505 Views
I have a few Custom Intents defined in an intents definitions file. One of these intents allow the user to capture an expense. Naturally, one of the parameters for the expense is the amount charged. When I initially created these intents in November 2022, this intent worked brilliantly. The user specified the amount, in the way you would usually communicate a currency amount by including words like "dollar" or "cents", and all worked well. About a month ago, a user informed me about a problem with the intent. All parameter values resolved except for the expense amount parameter. No matter what you provided for the expense amount, Siri would reply with "expense amount cannot be negative". Investigating the issue confirmed the problem. I'm unable to determine exactly when this started happening as most of our users don't use the Siri integration and not all users inform us about issues they find. I implemented a temporary workaround and finally have the time to spend to resolve this problem. I added a breakpoint to the intent handler's "resolveParameterExpenseAmount" method to see where the breakdown in communication was. First, the breakpoint was never hit. Siri would still reply with "expense amount cannot be negative". I realised the Validation Errors defined in the parameter's settings were catching the value before I was asked to resolve it in the intent handler. So I removed all of the validation errors (you can't remove them with the minus sign below, I just hit back space on the keyboard on each one). This time, the breakpoint was hit, but the expense amount was nil. To make sure I wasn't messing something up with this parameter being part of a whole bunch of other parameters, I decided to create just a simple Test intent. This is the properties on the custom intent: There is one parameter, configured like this: The section under Shortcuts app: The section under Suggestions: As for the response section, I kept it very basic: Finally, the intent handler for this test intent: This is a very basic test. Once again, after invoking the intent, Siri asks me for the test amount. Upon giving it to her, the reply: "Test Amount can't be negative". To change things up a little regarding "the negative number validation", I change the minimum value to -1, allowing the value to be negative. This time, no matter the amount I specify (including amounts like "one" and "zero"), the standard reply is: "Test Amount can't be higher than one hundred thousand". The one thing I'm uncertain about, is the "Currency Codes" section in the parameter settings: I don't know if I have to add the currencies the user can possibly talk about there? I can't find any proper documentation on the parameter settings specifically related to Currency Amount. For now, the work around remains in place. I changed my expense amount to type "Decimal". The drawback is that Siri cannot infer $542.62 from "Five hundred and forty two dollars and sixty two cents". I had to change the prompt to: "What is the expense amount? Specify only the numeric value and do not include currency metrics like dollar and cents." Really? That's just ridiculous! Especially since the Currency Amount parameter worked absolutely fine a few months ago. Are my settings wrong in the definition file? Is there an issue with SiriKit's validation on Currency Amounts? Must I specify currency codes somewhere? I'm not sure what else to try. Any advice will be greatly appreciated.
Posted
by
Post not yet marked as solved
0 Replies
330 Views
My query is, Sirikit is offering Person to person transfers. We want to split and provide use cases like P2P transfer via wallet and via card. Whether is it possible to modify or customize the Sirikit payments intents based on our application?
Posted
by
Post not yet marked as solved
0 Replies
607 Views
I have added Siri capability for an iOS/MacCatalyst app in Xcode. The app compiles just fine for iOS, but when compiling for MacCatalyst I get the error: “/Volumes/xdrive/M2/M2.xcodeproj Provisioning profile "Mac Catalyst Team Provisioning Profile: com.anotherview.M2.mac" doesn't include the com.apple.developer.siri entitlement. ” On the “Signing & Capabilities” page I get the error: “Automatic signing failed Xcode failed to provision this target. Please file a bug report at https://feedbackassistant.apple.com and include the Update Signing report from the Report navigator.” How can I add Siri capabilities on a Mac Catalyst app?
Posted
by
Post not yet marked as solved
1 Replies
490 Views
Hi, I want to integrate the sirikit into my app. Is possible to add custom sirikit command to control iOS app? I figure out the sirikit only support the standard intent. === Standard Intents === Car Commands Lists and Notes Media Messaging Payments Restaurant Reservations Ride Booking VoIP Calling Workouts But I also get that the user could send the command (Navigate to ***) with Google Map by Siri. Does any know how to do that? Please help me or give me some hint? Thanks.
Posted
by
Post not yet marked as solved
1 Replies
568 Views
Hey there, I implemented Siri and CarPlay. The INStartCallIntent works on iOS but not when initiating a voice command via CarPlay. Error from INIntentDeliverer: Unable to find implementation of resolution method for facade slot name (null) From what I see, I implemented all methods declared on INStartCallIntentHandling but none is called. Does someone know whats missing? 2023-08-29 11:34:52.551834+0200 MyApp[64559:4844776] [Intents] -[INIntentDeliverer _resolveIntentParameter:forIntent:intentHandler:updateIntent:withCompletion:]_block_invoke Unable to find implementation of resolution method for facade slot name (null) on intent <INStartCallIntent: 0x282a71830> {
Posted
by