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

SiriKit Documentation

Posts under SiriKit tag

70 Posts
Sort by:
Post not yet marked as solved
4 Replies
1.5k Views
Is it possible to make CLLocationManager calls in a Custom Intent Extension (on iOS)? If so, is there some special configuration (info.plist etc) necessary as I can't get it to work (as it's for example done in a Today Extension).Thank you.
Posted
by
Post not yet marked as solved
2 Replies
2.8k Views
Honestly I'm not quite sure where to search for, or how to get technical support for the new Shortcuts app. Basically, I'm wondering if the Shortcuts app supports custom error messages.My app has a custom intent, and if certain conditions aren't met it will respond with an error.When I trigger the shortcut directly from Siri, the error is shown (as expected) in the response: "Hmm, something went wrong. <App Name> says, "<My Error Message>".However, if I trigger the shortcut from the Shortcuts app, I just receive an alert saying "An unknown error occured" with no further details.Is this a bug or am I constructing my error response in some way that the Shortcuts app cannot understand:URActionIntentResponse* response = [[URActionIntentResponse alloc] initWithCode:URActionIntentResponseCodeFailure userActivity:nil]; response.error = @"Foobar"; self.completion(response);
Posted
by
Post not yet marked as solved
1 Replies
1.6k Views
I added an intents extension target to my project. It is embedded. 1) My app asks (and has) permission to use Siri. 2) My application's info.plist specifies a Siri Usage description 3) My target's "Supported Intents" row within its info.plist contains INSendMessageIntent, the one I'm trying to use. 4) I had to add my intent Bundle Extension to my developer account as an identifier using its specific Bundle Id. On the website I was able to add "Siri" support for app and app extension target. I was able to add Siri Capability to my main project and entitlements file, but I had to manually able to add it to the entitlements file for my extension: Siri was NOT a Capability option under "Signing and Capabilities" for my Target Extension within my app. 5) I have been running my extension target with "Siri" but have also tried it with app itself. Please help. Thank you.
Posted
by
Post not yet marked as solved
7 Replies
2.0k 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
3 Replies
887 Views
We donate our custom intents to SiriKit. Our intents have a couple parameters like: Start Foo in Boo The generic intent title is "Start Things". We need to show the specific title with params and not the generic title in Shortcuts. The problem is that the Shortcuts app does not distinguish our intents so we get tons and tons of "Start Things" suggestions for each different Foo, but each line in Shortcuts Add Action and Suggestions is simply "Start Things" for many pages over time as the user performs actions in our app. I have noticed some other apps are able to customize that title. Find My shows a title as "Show the location of SpecificiPadName". OpenTable shows "Get details for 'specific reservation name'". I have not been able to do the same kind of customization. In Xcode intent definition, the Shortcuts app and Suggestions section for the Intent does not seem to be related to the string used in the actual Shortcuts app. The generic title of the intent is always used in Shortcuts until you open the suggestion at which point you can customize the params. Either we need to disable suggestions altogether to avoid the user having pages of un-distinguished titles, or we need to customize the title to show its parameters. I note that even though we have 2 parameters, the "Key Parameter" menu in the Shortcuts app section of the Intent is disabled – I cannot select a parameter there. Also, the "Summary" in the Shortcuts app section is simply not what is shown in Shortcuts. Anyway, obviously there is some trick to this, but I have not been able to find it. Anyone have any insight into this?
Posted
by
Post not yet marked as solved
4 Replies
2.0k Views
Hello, i got this mail after upload my binary. /* Dear Developer, We identified one or more issues with a recent delivery for your app. Your delivery was successful, but you may wish to correct the following issues in your next delivery: ITMS-90626: Invalid Siri Support - Localized title for custom intent: 'Configuration' not found for locale: pl ITMS-90626: Invalid Siri Support - Localized title for custom intent: 'Configuration' not found for locale: es ITMS-90626: Invalid Siri Support - Localized title for custom intent: 'Configuration' not found for locale: da ITMS-90626: Invalid Siri Support - Localized title for custom intent: 'Configuration' not found for locale: ru ITMS-90626: Invalid Siri Support - Localized title for custom intent: 'Configuration' not found for locale: tr ITMS-90626: Invalid Siri Support - Localized title for custom intent: 'Configuration' not found for locale: el ITMS-90626: Invalid Siri Support - Localized title for custom intent: 'Configuration' not found for locale: nl ITMS-90626: Invalid Siri Support - Localized description for custom intent: 'Configuration' not found for locale: en ITMS-90626: Invalid Siri Support - Localized title for custom intent: 'Configuration' not found for locale: fr ITMS-90626: Invalid Siri Support - Localized title for custom intent: 'Configuration' not found for locale: nb ITMS-90626: Invalid Siri Support - Localized title for custom intent: 'Configuration' not found for locale: pt ITMS-90626: Invalid Siri Support - Localized title for custom intent: 'Configuration' not found for locale: sv ITMS-90626: Invalid Siri Support - Localized title for custom intent: 'Configuration' not found for locale: de ITMS-90626: Invalid Siri Support - Localized title for custom intent: 'Configuration' not found for locale: cs ITMS-90626: Invalid Siri Support - Localized title for custom intent: 'Configuration' not found for locale: it After you’ve corrected the issues, you can upload a new binary to App Store Connect. Best regards, The App Store Team / My App SiriKit Intent has only de and en localization files. The en and de localization strings are fully filled. What's the problem ???
Posted
by
Post not yet marked as solved
5 Replies
1.6k Views
I'm trying to donate an INSendMessageIntent for multiple recipients in a group. No matter what I do, the share sheet shows "1 Person" and a maximum of 1 profile image. How can I get it to show the correct number of people, and all of the profile images I set? Example screenshot: i.stack.imgur.com/VRf5i.png Sample code follows. Click "Donate Group Without Images" => share sheet suggestion shows 3 bubbles but says "1 Person" Click "Donate Group With Individual Images" => share sheet suggestion shows the first person's image (the letter A), not all 3 images, and still says "1 Person" Click "Donate Group with One Image" (...using undocumented setImage:forParameterNamed:...) => share sheet suggestion correctly shows the single group image, but still says "1 Person". Steps to reproduce: Create a new SwiftUI app with the below code as ContentView.swift. Edit Info.plist to include NSUserActivityTypes: ["INSendMessageIntent"] Add a share extension target; edit the target to add INSendMessageIntent under Supported Intents. Run the app on a device. (Share sheet suggestions don't seem to work in the simulator.) Try clicking the buttons to donate intents, and then clicking the share button to activate the share sheet. ContentView.swift: import SwiftUI import Intents import IntentsUI struct ActivityVC: UIViewControllerRepresentable {   func makeUIViewController(context: Context) -> some UIViewController {     return UIActivityViewController(activityItems: [UIImage(systemName: "photo")!], applicationActivities: nil)   }   func updateUIViewController(_ uiViewController: UIViewControllerType, context: Context) {} } struct ContentView: View {   @State var showActivityVC = false       var body: some View {     VStack(spacing: 24) {       Button("Donate Single Without Image") {         let person1 = INPerson(personHandle: INPersonHandle(value: "Aid", type: .unknown), nameComponents: nil, displayName: "A", image: nil, contactIdentifier: nil, customIdentifier: "Aid")                   let intent = INSendMessageIntent(recipients: [person1], outgoingMessageType: .outgoingMessageText, content: nil, speakableGroupName: INSpeakableString(spokenPhrase: "Single"), conversationIdentifier: "1", serviceName: nil, sender: nil, attachments: nil)                   INInteraction(intent: intent, response: nil).donate { (err) in           print("Donated single without image: \(err as Any)")         }       }       Button("Donate Group Without Images") {         let person1 = INPerson(personHandle: INPersonHandle(value: "Aid", type: .unknown), nameComponents: nil, displayName: "A", image: nil, contactIdentifier: nil, customIdentifier: "Aid")         let person2 = INPerson(personHandle: INPersonHandle(value: "Bid", type: .unknown), nameComponents: nil, displayName: "B", image: nil, contactIdentifier: nil, customIdentifier: "Bid")         let person3 = INPerson(personHandle: INPersonHandle(value: "Cid", type: .unknown), nameComponents: nil, displayName: "B", image: nil, contactIdentifier: nil, customIdentifier: "Cid")                   let intent = INSendMessageIntent(recipients: [person1, person2, person3], outgoingMessageType: .outgoingMessageText, content: nil, speakableGroupName: INSpeakableString(spokenPhrase: "NoImages"), conversationIdentifier: "2", serviceName: nil, sender: nil, attachments: nil)                   INInteraction(intent: intent, response: nil).donate { (err) in           print("Donated group without images: \(err as Any)")         }       }       Button("Donate Group With Individual Images") {         let person1 = INPerson(personHandle: INPersonHandle(value: "Aid", type: .unknown), nameComponents: nil, displayName: "A", image: INImage(uiImage: UIImage(systemName: "a.circle.fill")!), contactIdentifier: nil, customIdentifier: "Aid")         let person2 = INPerson(personHandle: INPersonHandle(value: "Bid", type: .unknown), nameComponents: nil, displayName: "B", image: INImage(uiImage: UIImage(systemName: "b.circle.fill")!), contactIdentifier: nil, customIdentifier: "Bid")         let person3 = INPerson(personHandle: INPersonHandle(value: "Cid", type: .unknown), nameComponents: nil, displayName: "C", image: INImage(uiImage: UIImage(systemName: "c.circle.fill")!), contactIdentifier: nil, customIdentifier: "Cid")                   let intent = INSendMessageIntent(recipients: [person1, person2, person3], outgoingMessageType: .outgoingMessageText, content: nil, speakableGroupName: INSpeakableString(spokenPhrase: "SeparateImages"), conversationIdentifier: "3", serviceName: nil, sender: nil, attachments: nil)                   INInteraction(intent: intent, response: nil).donate { (err) in           print("Donated group with individual images: \(err as Any)")         }       }       Button("Donate Group with One Image") {         let person1 = INPerson(personHandle: INPersonHandle(value: "Aid", type: .unknown), nameComponents: nil, displayName: "A", image: nil, contactIdentifier: nil, customIdentifier: "Aid")         let person2 = INPerson(personHandle: INPersonHandle(value: "Bid", type: .unknown), nameComponents: nil, displayName: "B", image: nil, contactIdentifier: nil, customIdentifier: "Bid")                   let intent = INSendMessageIntent(recipients: [person1, person2], outgoingMessageType: .outgoingMessageText, content: nil, speakableGroupName: INSpeakableString(spokenPhrase: "OneGroupImage"), conversationIdentifier: "4", serviceName: nil, sender: nil, attachments: nil)                   // This "forParameterNamed: \.speakableGroupName" is totally undocumented, but following the example from: https://developer.apple.com/documentation/foundation/app_extension_support/supporting_suggestions_in_your_app_s_share_extension         intent.setImage(INImage(uiImage: UIImage(systemName: "g.circle.fill")!), forParameterNamed: \.speakableGroupName)                   INInteraction(intent: intent, response: nil).donate { (err) in           print("Donated group with one image: \(err as Any)")         }       }       Button("Delete All") {         INInteraction.deleteAll { (err) in           print("Deleted: \(err as Any)")         }       }               Spacer().frame(height: 24)               Button(action: { showActivityVC = true }) {         Image(systemName: "square.and.arrow.up")       }     }     .sheet(isPresented: $showActivityVC) {       ActivityVC()     }   } } struct ContentView_Previews: PreviewProvider {   static var previews: some View {     ContentView()   } }
Posted
by
Post not yet marked as solved
10 Replies
2.4k Views
Hello everyone! I have this code in my INExtension: UIPasteboard.general.items.removeAll() Up through iOS 14.5, this worked correctly. However, in 14.5.1 and 14.6 beta 2, the following error message appears in the console, and the system pasteboard remains unchanged. Could not save pasteboard named com.apple.UIKit.pboard.general. Error: Error Domain=PBErrorDomain Code=11 "The pasteboard name com.apple.UIKit.pboard.general is not valid." UserInfo={NSLocalizedDescription=The pasteboard name com.apple.UIKit.pboard.general is not valid.} I filed FB9098625. Is anyone else having this issue?
Posted
by
Post not yet marked as solved
2 Replies
827 Views
Have an app which has an intent definition defined in a framework. I understand that I have to add it to the project, but am seeing this warning message in Xcode when I run the app. The intents do seem to be working properly, however. iOS 14 and Xcode 12.5: objc[15464]: Class IntentSampleClassResolutionResult is implemented in both /private/var/containers/Bundle/Application/UUID/APPNAME.app/Frameworks/FRAMEWORKNAME.framework/Class (0x10917c2f8) and /private/var/containers/Bundle/Application/UUID/APPNAME.app/APPNAME (0x1028c1620). One of the two will be used. Which one is undefined. If I remove the intent definition file from my compile sources build settings, those warning messages disappear, but when I run the shortcut action, I get this warning in the console: 2021-06-12 21:07:54.234798-0700 APPNAME[15473:7317463] [Intents] -[INIntentResponse init] App proxy <<LSApplicationProxy: 0x127acaac0> com.company.appname file:///private/var/containers/Bundle/Application/UUID/APPNAME.app/ <com.company.appname :0>> doesn't contain intent SampleIntent, falling back to current bundle Any thoughts on how to suppress both of these warnings?
Posted
by
Post not yet marked as solved
1 Replies
544 Views
Hi all, I am using a UIViewControllerRepresentable that wraps the INUIAddVoiceShortcutButton and presents the INUIAddVoiceShortcutViewController for the user to be able to add my shortcut to Siri. In the past I remember the interaction involved recording a voice trigger (sample article with reference screenshots, https://bit.ly/3ee1Avf However iOS14 seems to have removed this interaction and wants to add the shortcut straight to Siri? Can someone confirm that this is true and there no longer a way to trigger recording the voice prompt? My usecase might be a little more unique where we are building apps for an ingdigenous language program in Australia and we want Siri to trigger on What' Wiradjuri for ... which obviously is not an English word. Thanks for any points and appreciate you sparing your time to read/respond.
Posted
by
Post not yet marked as solved
1 Replies
408 Views
This link demonstrates that we should be able to handle custom intents in-app. My first question is that can this be done for system intents too? That is, can we avoid making an intent extension altogether and handle a system intent directly in app? Also, I am facing some issue trying to implement SiriKit for my tvOS app. I have tried the following: Added Siri in Signing & Capabilities in .xcodeproj file of my app. Added Privacy - Siri Usage Description string in pInfo.list. Called the requestSiriAuthorization function in my app code flow. Because of the above 3 steps, a pop up appears on my app asking the user to grant authorization to use Siri which I allow. I also implemented my handlerForIntent in my app delegate: - (nullable id)application:(UIApplication *)application handlerForIntent:(INIntent *)intent { NSLog(@"handlerForIntent Enter - [DEBUG_STRING]"); return NULL; } I am not returning any handler for now because I just want this function to be triggered somehow however, that is not happening. I added a system intent in the Supports Intent of the target. Specifically, the INAddTasksIntent. I haven't added any code pertaining to resolving, confirming or handling of this specific intent. My entire concern for now is to catch the intent in handlerForIntent function given above. As per this documentation , I should be able to invoke this intent using the phrases given in the link. However, this doesn't work. Is it because I need to implement an intents extension for this particular intent? Since, the previous step for system intent didn't work, I went to try out the custom intent in-app handling that was mentioned in the first link. Here, I added a custom intent of Search category, following the steps in the link. And I added the custom intent in the Supported Intents list. However, I don't think these changes are taking effect as I cannot seem to get the symbols for this custom intent. Do I have to configure some build setting to generate the symbols for the custom intent? If someone can help in what exactly am I missing here, it'll be very helpful. Many thanks.
Posted
by
Post not yet marked as solved
0 Replies
341 Views
In Korea, I heard that this new feature, Siri On Device (AI), does not support Korean. I would like to send a suggestion in hopes that the Siri on-device function will be supported in Korea as well. Thanks for reading this long post and I hope you have a nice day
Posted
by
Post not yet marked as solved
2 Replies
601 Views
In iOS 14.6 onwards Siri stopped showing the custom error response template message in the Confirm phase. When we are returning an error in the confirm phase Siri always says Sorry, You'll need to continue in the app and then Uh oh, there's a problem. Please try again. If we return the same error in the Handle phase is showing expected error message defined in the response template The same code is showing the expected error message in the iOS 14.3 devices. In iOS 14.3 device custom error response message displayed as Sorry something went wrong, App Name Says, Error response template message .... It looks like Apple updated the error message behavior in the iOS 14.6 devices. I believe this is the expected behavior of upcoming OS versions. Let me know if have any solution to resolve this issue! since we need to show a proper error message to the user in the confirm phase.
Posted
by
Post marked as solved
4 Replies
1.4k Views
My app has a Siri Shortcut that works fine when I execute it from the Shortcuts app on my watch, but if I try to activate it by voice, Siri says: "Sorry, something's wrong. Please try again." and then a second later says "We've had a problem. Please try again." I'm currently on watchOS 8 beta 6. I last tested this in early July with beta 2 or beta 3 and it was working at that time. I haven't made any changes to the intent extension since then. The shortcut activates fine by voice on my phone, running iOS 15 beta 6. I'm also able to execute other Shortcuts by voice on my watch. Has anyone else run into this before? Is there a way to debug the intent extension on the watch, so I can see if any of my intent handler code is even being called?
Posted
by
Post marked as solved
1 Replies
404 Views
Hello, I am new to Sirikit and I am struggling to accomplish something which seems simple. I need to capture in my app a note from the user using Siri without Siri asking any questions and the application in the background, and after the note is saved in the application Siri needs to say Recorded. I used the system intent INCreateNoteIntent and it works fine as expected but the the initiation phrase that the user needs to say "Create a note on " isn't friendly enough to the user. I would like the user just say "Record" and the after that. Is it possible? I tried also custom intents without any success. Any help will be greatly appreciated.
Posted
by
Post not yet marked as solved
0 Replies
399 Views
I have an intent whose flow looks like this when performing the action: 1. Get details from user 2. Add items to local db 3. Get return value from db -- if user is signed in 4. Send new data to API -- In these steps I can finish the intent at step 3, but in some cases I'll need to send the new data to an API so it can be propagated to other user's devices. If I simply wait until the API returns, some users may notice a delay after being signed in, eg: after signing in, the task now takes a few seconds when it used to take only a split second. Is there a way I can return the intent while continuing the background process? Or is it okay to simply call the completion handler, then continue my script in the func handle(intent:
Posted
by
Post not yet marked as solved
0 Replies
550 Views
Do I need to check Intent is eligible for Siri Suggestions before donate it with INInteraction? But I only want to donate this intent so Siri can add my widget to Smart Stack, not in Lock Screen or other places. Intent Definition: Intent is eligible for widgets Intent is user-configurable in the Shortcuts app and Add to Siri Intent is eligible for Siri Suggestions Donate Intent: let widgetIntent = MyWidgetConfigurationIntent() widgetIntent.range = .weekly // Configure my intent let interaction = INInteraction(intent: intent, response: nil) interaction.donate { error in if let error = error { // Error: Code=1901 "Cannot donate interaction with intent that has no valid shortcut types" } }
Posted
by