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

Posts under SiriKit tag

200 Posts

Post

Replies

Boosts

Views

Activity

AppIntents: pauses in siri's speech and hiding dialog text
Is it possible to put a pause in Siri's responses to an AppIntent? in the code below id like Siri to pause a bit longer than she does between sentence one and sentence two. i've tried using "..." and multiple "." similar to what she does when she's responding to "how is the market" if you ask a HomePod - she pauses a bit longer between her comments on each market, a bit more than an end of sentence - more like the pause between each point when you are going through a list of bullet points - which is really what i'm using this for. Also is it possible to hide all or part of of the dialog text displayed? so she says it but doesn't show it. I've got a view which shows a better formatted representation of what she says than the text itself. struct TestAppIntent: AppIntent {     static var title: LocalizedStringResource = "A question?"     static var openAppWhenRun: Bool = false     @MainActor     func perform() async throws -> some IntentResult {         return .result(             dialog: "sentence one. sentence two", view: someView()         )     } }
1
2
1.4k
Jul ’22
Parse data from natural language text using SiriKit
I want to add a feature where a user can type a request using natural language to trigger different actions within my app (eg. "Create an assignment due tomorrow at midnight", "Create a high priority assignment called Final Presentation"). I'd like to leverage SiriKit to process this text, parse the data, and handle the response like I would if the user had asked Siri. First, is this even possible to do? Second, if not what other technologies could I use to parse natural language text?
1
0
1.6k
Jul ’22
handleInApp response code not available in custom SiriKit intent
Hi, I have created my own custom SiriKit Intent, and in the handler I am returning the response code of .continueInApp which opens my app in response. I've worked out that I want to open my app in the background, and .handleInApp seems to be the correct response code to do this. However, .handleInApp is not an option in my intent's enum generated by Xcode. If I look at the auto-generated code, I see .continueInApp, and .success, etc, but no .handleInApp. My Deployment Target is set to iOS 15.5 everywhere that I can find, so I really can't figure out why .handleInApp is not included in the auto-generated code. I've even tried creating a brand new workspace and project totally separate from my main one, and still creating a SiriKit Intent Definition does not generate code that includes .handleInApp. Is there something I need to enable to make .handleInApp appear as an enum option?
3
0
1.3k
Jul ’22
Siri not authenticating `INStartCallIntent`
In my VoIP application, users can start a VoIP call with Siri. In my app extension, I have a class conforming to INStartCallIntentHandling, which resolves the contacts, call destination, and call capability of the intent. When the user attempts to start a VoIP call while the device is locked, my app extension is called, and Siri launches my app, starting the VoIP call while the device is still locked. According to the documentation, adding INStartCallIntent to the IntentsRestrictedWhileProtectedDataUnavailable key of my extension's Info.plist should require the user to unlock the device before Siri launches my app and passes it the user activity. This is not working, and I haven't found any way to enforce this behavior. I downloaded Google Voice and WhatsApp, and they require the user to unlock the device when starting a VoIP call with Siri from a locked device. Is there something more I need to do? Here is my Info.plist: <key>NSExtension</key> <dict> <key>NSExtensionAttributes</key> <dict> <key>IntentsRestrictedWhileLocked</key> <array/> <key>IntentsRestrictedWhileProtectedDataUnavailable</key> <array> <string>OpenDialerTabAudioIntent</string> <string>OpenDialerTabVideoIntent</string> <string>OpenFaxTabIntent</string> <string>OpenNewsfeedTabIntent</string> <string>OpenSearchTabIntent</string> <string>INStartCallIntent</string> </array> <key>IntentsSupported</key> <array> <string>OpenDialerTabAudioIntent</string> <string>OpenDialerTabVideoIntent</string> <string>OpenFaxTabIntent</string> <string>OpenNewsfeedTabIntent</string> <string>OpenSearchTabIntent</string> <string>INStartCallIntent</string> </array> </dict> <key>NSExtensionPointIdentifier</key> <string>com.apple.intents-service</string> <key>NSExtensionPrincipalClass</key> <string>$(PRODUCT_MODULE_NAME).IntentHandler</string> </dict> I've read that WhatsApp isn't using CallKit, but I don't know if that is true. Any Help would be appreciated.
0
1
1.3k
Jun ’22
INIntent Issue
INIntent Issue In my main app, after I send a message(key code): let inImage = INImage(imageData: imageData) let person = INPerson( personHandle: INPersonHandle( value: personId, type: .emailAddress), nameComponents: nil, displayName: personName, image: inImage, contactIdentifier: nil, customIdentifier: String(chatid) ) let smi = INSendMessageIntent( recipients: persons, outgoingMessageType: .outgoingMessageText, content: nil, speakableGroupName: groupName, conversationIdentifier: "\(chatid)", serviceName: nil, sender: nil, attachments: nil ) smi.setImage(inImage, forParameterNamed: \.speakableGroupName) let interaction = INInteraction(intent: smi, response: nil) interaction.groupIdentifier = String(chatid) interaction.donate { error in } I get INImage instance in share extension by: if let intent = extensionContext?.intent as? INSendMessageIntent, let avatar = intent.keyImage() { // ... } When I call INImage.fetchUIImage method: func loadImageBy(_ inImage: INImage) { imgView.image = nil loadImageIdentifier = UUID() inImage.fetchUIImage { [weak self, loadImageIdentifier] image in guard self?.loadImageIdentifier == loadImageIdentifier else { return } self?.imgView.image = image } } I got this error: Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[INRemoteImageProxy fetchUIImageWithCompletion:]: unrecognized selector sent to instance 0x2810969e0’
0
0
1.5k
Jun ’22
SiriKit (Send-Request-Payment) not recognizing existing project but works with new projects
Hello everyone, We have a project that is 2 years old and we are trying to implement SiriKit's payment intents. But every time we request Siri to process send a payment, Siri replies that our app isn't configured yet to do so. We tried the same implementation in a new project and it worked fine, Siri sent payments successfully. What are we doing wrong ? We hit Apple Technical Code Level Support but they are asking for a simplified version of our code that adresses the issue, but the problem is that we want to know why it doesn't work within our current app. We have seen that many people experienced the same issue on existing projects in forums but no solution has been found. Thanks for sending us hints.
0
0
1.1k
Jun ’22
What Intents are appropriate for button actions
Hello, I'm trying to add siri support to a video conferencing application. To start out, I would just like siri to respond to a phrase like "Hey Siri, mute my {apps name} video" or "Hey siri, mute my {apps name} audio", and the intent handler can just kick-off an IBAction that mutes the video or audio. Do I need to create custom intents to fulfil this purpose? Or is there a standard intent that may work here.
0
0
510
May ’22
Siri Intent Query for INSearchForAccountsIntent
How to make a siri query for INSearchForAccountsIntent, so that i could get value in accountNickName in the intent? I have tried different combination of query but accountNickName alone is not being recognized. Example: How much money in my abc checking account? note - abc is the accountNickName, but that is not recognizaed by siri to map for accountNickName. Kindly suggest.
0
0
576
May ’22
Questions related to Siri Shortcuts
I am adding Siri Shortcuts to my navigation app. I understood in order to use Siri voice to trigger shortcuts, for custom intents, the users have to add voice phrases or record voice for shorctus by Add to Siri button or built-in Shortcuts app; for system intents, the users don't need to do that because Siri already knows all the trigger voice phrases. But when I say "Navigate to the station using Google Maps", the whole shortcut works without adding to Siri manullay. And based on https://developer.apple.com/documentation/sirikit, I couldn't find any system intents related to Navigation Domain. Did I misunderstand anything here? How could Siri and Google Maps exchange intents here without system navigation intents or adding to Siri manually?
0
0
683
Apr ’22
Siri not recognizing alternate app name in iOS 15
I am working on a Siri integration for a VoIP application. I've added values for both INAlternativeAppName and INAlternativeAppNamePronunciationHint under INAlternativeAppNames in the app target's info.plist. On iOS 14, the phrase "Call [number] using [alternate app name]" launches my app and initiates a VoIP call. on iOS 15, Siri responds with "I don't see an app for that. You'll need to download one." to the same phrase. Is this functionality broken in iOS 15? Here is INAlternativeAppName in my info.plist: <key>INAlternativeAppNames</key> <array> <dict> <key>INAlternativeAppName</key> <string>dialer</string> <key>INAlternativeAppNamePronunciationHint</key> <string>dial er</string> </dict> </array>
0
0
1.4k
Apr ’22
Recommendations on getting app to speak to driver
Hi I am developing an app which will provide near real-time feedback (ie, minimum speed in a turn) to drivers during track events. (Track events put a driver on a race track for either head-to-head racing or for teaching a driver to drive fast and safe on a race track.) I want the feedback to be audio (ie, a voice) rather than a display. But, there are so many options available (Siri, Carplay, notifications, etc) that I don't know what might be best. Right now, I'd just like the app to announce the contents of a UILabel. What would be your recommendations? In the very long term, I'd like the app to respond to driver's voice (for selecting which metric to feedback). My particular model year of car does not support CarPlay, so I'd have to rule CarPlay. (Beyond getting the app to talk, I also have to determine the best way to get the spoken messages to the driver. Do I use Bluetooth to connect to my car's audio, or use the remote audio plug of the car, or attempt to get the audio into the speakers many drivers have in their helmets. But that is a topic for another day...) Thanks for your feedback.
1
0
836
Apr ’22
Apple pay integration in siri shortcut
I have developed a siri shortcut where user can order coffee using siri voice commands. This shortcut asks users about the payment method to be used while ordering the coffee. Is it possible to integrate support for apple pay while ordering coffee in the siri shortcut. I've been reading documentation but i couldn't find any support in implementing apple pay in siri shortcut. I want to ask if its doable, please provide some help or sample code to achieve it or if its not doable i want to have something to show to my employer.
0
0
1.1k
Apr ’22
Customize INSendMessageIntent preview in Siri
Hi everyone, I'm implementing a "Send message" feature with Siri using INSendMessageIntentHandling for a messaging application. And I'm using speakableGroupName to help me distinguish between different kinds of contacts. When SiriKit displays the message to send, it shows the following "preview": I would like to know if there is a way to customize what is displayed in the "To" field: ideally, I would like to display the list of recipients (as when speakableGroupName is nil), instead of the speakableGroupName itself. I considered using an Intent UI extension, but this does not seem relevant in this case (as far a I understand it, a Intent UI extension allows to customize the view presented after the execution of handle, not the one before). Thank you in advance for your help!
0
0
542
Apr ’22
INSendMessageIntent suggestions always show "1 person", even for multiple recipients
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()   } }
5
1
3.4k
Mar ’22
AppIntents: pauses in siri's speech and hiding dialog text
Is it possible to put a pause in Siri's responses to an AppIntent? in the code below id like Siri to pause a bit longer than she does between sentence one and sentence two. i've tried using "..." and multiple "." similar to what she does when she's responding to "how is the market" if you ask a HomePod - she pauses a bit longer between her comments on each market, a bit more than an end of sentence - more like the pause between each point when you are going through a list of bullet points - which is really what i'm using this for. Also is it possible to hide all or part of of the dialog text displayed? so she says it but doesn't show it. I've got a view which shows a better formatted representation of what she says than the text itself. struct TestAppIntent: AppIntent {     static var title: LocalizedStringResource = "A question?"     static var openAppWhenRun: Bool = false     @MainActor     func perform() async throws -> some IntentResult {         return .result(             dialog: "sentence one. sentence two", view: someView()         )     } }
Replies
1
Boosts
2
Views
1.4k
Activity
Jul ’22
Parse data from natural language text using SiriKit
I want to add a feature where a user can type a request using natural language to trigger different actions within my app (eg. "Create an assignment due tomorrow at midnight", "Create a high priority assignment called Final Presentation"). I'd like to leverage SiriKit to process this text, parse the data, and handle the response like I would if the user had asked Siri. First, is this even possible to do? Second, if not what other technologies could I use to parse natural language text?
Replies
1
Boosts
0
Views
1.6k
Activity
Jul ’22
handleInApp response code not available in custom SiriKit intent
Hi, I have created my own custom SiriKit Intent, and in the handler I am returning the response code of .continueInApp which opens my app in response. I've worked out that I want to open my app in the background, and .handleInApp seems to be the correct response code to do this. However, .handleInApp is not an option in my intent's enum generated by Xcode. If I look at the auto-generated code, I see .continueInApp, and .success, etc, but no .handleInApp. My Deployment Target is set to iOS 15.5 everywhere that I can find, so I really can't figure out why .handleInApp is not included in the auto-generated code. I've even tried creating a brand new workspace and project totally separate from my main one, and still creating a SiriKit Intent Definition does not generate code that includes .handleInApp. Is there something I need to enable to make .handleInApp appear as an enum option?
Replies
3
Boosts
0
Views
1.3k
Activity
Jul ’22
Siri not authenticating `INStartCallIntent`
In my VoIP application, users can start a VoIP call with Siri. In my app extension, I have a class conforming to INStartCallIntentHandling, which resolves the contacts, call destination, and call capability of the intent. When the user attempts to start a VoIP call while the device is locked, my app extension is called, and Siri launches my app, starting the VoIP call while the device is still locked. According to the documentation, adding INStartCallIntent to the IntentsRestrictedWhileProtectedDataUnavailable key of my extension's Info.plist should require the user to unlock the device before Siri launches my app and passes it the user activity. This is not working, and I haven't found any way to enforce this behavior. I downloaded Google Voice and WhatsApp, and they require the user to unlock the device when starting a VoIP call with Siri from a locked device. Is there something more I need to do? Here is my Info.plist: <key>NSExtension</key> <dict> <key>NSExtensionAttributes</key> <dict> <key>IntentsRestrictedWhileLocked</key> <array/> <key>IntentsRestrictedWhileProtectedDataUnavailable</key> <array> <string>OpenDialerTabAudioIntent</string> <string>OpenDialerTabVideoIntent</string> <string>OpenFaxTabIntent</string> <string>OpenNewsfeedTabIntent</string> <string>OpenSearchTabIntent</string> <string>INStartCallIntent</string> </array> <key>IntentsSupported</key> <array> <string>OpenDialerTabAudioIntent</string> <string>OpenDialerTabVideoIntent</string> <string>OpenFaxTabIntent</string> <string>OpenNewsfeedTabIntent</string> <string>OpenSearchTabIntent</string> <string>INStartCallIntent</string> </array> </dict> <key>NSExtensionPointIdentifier</key> <string>com.apple.intents-service</string> <key>NSExtensionPrincipalClass</key> <string>$(PRODUCT_MODULE_NAME).IntentHandler</string> </dict> I've read that WhatsApp isn't using CallKit, but I don't know if that is true. Any Help would be appreciated.
Replies
0
Boosts
1
Views
1.3k
Activity
Jun ’22
Is it possible to add support for contacts "Found in..." to my app?
In the contacts app there are contacts included that include "Siri found in Mail". I have an app that includes a directory of contact information. Is it possible to include contacts found in my app to the system?
Replies
0
Boosts
0
Views
711
Activity
Jun ’22
INIntent Issue
INIntent Issue In my main app, after I send a message(key code): let inImage = INImage(imageData: imageData) let person = INPerson( personHandle: INPersonHandle( value: personId, type: .emailAddress), nameComponents: nil, displayName: personName, image: inImage, contactIdentifier: nil, customIdentifier: String(chatid) ) let smi = INSendMessageIntent( recipients: persons, outgoingMessageType: .outgoingMessageText, content: nil, speakableGroupName: groupName, conversationIdentifier: "\(chatid)", serviceName: nil, sender: nil, attachments: nil ) smi.setImage(inImage, forParameterNamed: \.speakableGroupName) let interaction = INInteraction(intent: smi, response: nil) interaction.groupIdentifier = String(chatid) interaction.donate { error in } I get INImage instance in share extension by: if let intent = extensionContext?.intent as? INSendMessageIntent, let avatar = intent.keyImage() { // ... } When I call INImage.fetchUIImage method: func loadImageBy(_ inImage: INImage) { imgView.image = nil loadImageIdentifier = UUID() inImage.fetchUIImage { [weak self, loadImageIdentifier] image in guard self?.loadImageIdentifier == loadImageIdentifier else { return } self?.imgView.image = image } } I got this error: Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[INRemoteImageProxy fetchUIImageWithCompletion:]: unrecognized selector sent to instance 0x2810969e0’
Replies
0
Boosts
0
Views
1.5k
Activity
Jun ’22
How to make siri Intents like youtube?
Hello, I want to make siri Intents like youtube app. If I said to siri 'Search Apple in Youtube' then Open the youtube app and show result by 'apple'. How can I make this? please help me. thank you.
Replies
0
Boosts
0
Views
707
Activity
Jun ’22
SiriKit (Send-Request-Payment) not recognizing existing project but works with new projects
Hello everyone, We have a project that is 2 years old and we are trying to implement SiriKit's payment intents. But every time we request Siri to process send a payment, Siri replies that our app isn't configured yet to do so. We tried the same implementation in a new project and it worked fine, Siri sent payments successfully. What are we doing wrong ? We hit Apple Technical Code Level Support but they are asking for a simplified version of our code that adresses the issue, but the problem is that we want to know why it doesn't work within our current app. We have seen that many people experienced the same issue on existing projects in forums but no solution has been found. Thanks for sending us hints.
Replies
0
Boosts
0
Views
1.1k
Activity
Jun ’22
SiriKit Shortcut not working in apple watch(Alert app not installed))
My app donate shortcut , shortcut type is NSUserActivity, everything work fine in iOS My app also have watch app, the Watch APP has been installed on my watch. When I run this shortcut on apple watch, I am prompted that the App is not installed I am 100% sure the Watch has this app installed How to solve this problem?
Replies
0
Boosts
0
Views
891
Activity
May ’22
What Intents are appropriate for button actions
Hello, I'm trying to add siri support to a video conferencing application. To start out, I would just like siri to respond to a phrase like "Hey Siri, mute my {apps name} video" or "Hey siri, mute my {apps name} audio", and the intent handler can just kick-off an IBAction that mutes the video or audio. Do I need to create custom intents to fulfil this purpose? Or is there a standard intent that may work here.
Replies
0
Boosts
0
Views
510
Activity
May ’22
Siri Intent
Dears, I want to create a Siri intent that calls an API. I would like to have it call the API without opening the App. Is that possible? if it is, how?
Replies
0
Boosts
0
Views
508
Activity
May ’22
Siri Intent Query for INSearchForAccountsIntent
How to make a siri query for INSearchForAccountsIntent, so that i could get value in accountNickName in the intent? I have tried different combination of query but accountNickName alone is not being recognized. Example: How much money in my abc checking account? note - abc is the accountNickName, but that is not recognizaed by siri to map for accountNickName. Kindly suggest.
Replies
0
Boosts
0
Views
576
Activity
May ’22
Questions related to Siri Shortcuts
I am adding Siri Shortcuts to my navigation app. I understood in order to use Siri voice to trigger shortcuts, for custom intents, the users have to add voice phrases or record voice for shorctus by Add to Siri button or built-in Shortcuts app; for system intents, the users don't need to do that because Siri already knows all the trigger voice phrases. But when I say "Navigate to the station using Google Maps", the whole shortcut works without adding to Siri manullay. And based on https://developer.apple.com/documentation/sirikit, I couldn't find any system intents related to Navigation Domain. Did I misunderstand anything here? How could Siri and Google Maps exchange intents here without system navigation intents or adding to Siri manually?
Replies
0
Boosts
0
Views
683
Activity
Apr ’22
Siri not recognizing alternate app name in iOS 15
I am working on a Siri integration for a VoIP application. I've added values for both INAlternativeAppName and INAlternativeAppNamePronunciationHint under INAlternativeAppNames in the app target's info.plist. On iOS 14, the phrase "Call [number] using [alternate app name]" launches my app and initiates a VoIP call. on iOS 15, Siri responds with "I don't see an app for that. You'll need to download one." to the same phrase. Is this functionality broken in iOS 15? Here is INAlternativeAppName in my info.plist: <key>INAlternativeAppNames</key> <array> <dict> <key>INAlternativeAppName</key> <string>dialer</string> <key>INAlternativeAppNamePronunciationHint</key> <string>dial er</string> </dict> </array>
Replies
0
Boosts
0
Views
1.4k
Activity
Apr ’22
Recommendations on getting app to speak to driver
Hi I am developing an app which will provide near real-time feedback (ie, minimum speed in a turn) to drivers during track events. (Track events put a driver on a race track for either head-to-head racing or for teaching a driver to drive fast and safe on a race track.) I want the feedback to be audio (ie, a voice) rather than a display. But, there are so many options available (Siri, Carplay, notifications, etc) that I don't know what might be best. Right now, I'd just like the app to announce the contents of a UILabel. What would be your recommendations? In the very long term, I'd like the app to respond to driver's voice (for selecting which metric to feedback). My particular model year of car does not support CarPlay, so I'd have to rule CarPlay. (Beyond getting the app to talk, I also have to determine the best way to get the spoken messages to the driver. Do I use Bluetooth to connect to my car's audio, or use the remote audio plug of the car, or attempt to get the audio into the speakers many drivers have in their helmets. But that is a topic for another day...) Thanks for your feedback.
Replies
1
Boosts
0
Views
836
Activity
Apr ’22
Apple pay integration in siri shortcut
I have developed a siri shortcut where user can order coffee using siri voice commands. This shortcut asks users about the payment method to be used while ordering the coffee. Is it possible to integrate support for apple pay while ordering coffee in the siri shortcut. I've been reading documentation but i couldn't find any support in implementing apple pay in siri shortcut. I want to ask if its doable, please provide some help or sample code to achieve it or if its not doable i want to have something to show to my employer.
Replies
0
Boosts
0
Views
1.1k
Activity
Apr ’22
Customize INSendMessageIntent preview in Siri
Hi everyone, I'm implementing a "Send message" feature with Siri using INSendMessageIntentHandling for a messaging application. And I'm using speakableGroupName to help me distinguish between different kinds of contacts. When SiriKit displays the message to send, it shows the following "preview": I would like to know if there is a way to customize what is displayed in the "To" field: ideally, I would like to display the list of recipients (as when speakableGroupName is nil), instead of the speakableGroupName itself. I considered using an Intent UI extension, but this does not seem relevant in this case (as far a I understand it, a Intent UI extension allows to customize the view presented after the execution of handle, not the one before). Thank you in advance for your help!
Replies
0
Boosts
0
Views
542
Activity
Apr ’22
INSendMessageIntent suggestions always show "1 person", even for multiple recipients
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()   } }
Replies
5
Boosts
1
Views
3.4k
Activity
Mar ’22
Running Siri Tests on Xcode Cloud?
When I run Siri tests, the very first run requires I tap a button in the simulator to allow the test to use Siri on the device. Is there any way to automatically allow that so I can run completely headless tests?
Replies
0
Boosts
0
Views
1.3k
Activity
Mar ’22
Siri Intent get user location
I tried to use location manager (CLLocationManager) in a custom intent handler, so I can make some calculations based on Latitude and Longitude. But didUpdateLocations method is never called, neither didFailWithError. It is possible to use Location services in an intent used with Siri?
Replies
1
Boosts
0
Views
984
Activity
Feb ’22