0

*Using Swift 4.2 & Xcode 10.2

I'm trying to make my application more feature-rich by allowing a user to create an object hands free. The app is designed to make the creation of certain object easier, so it would be great to allow a user to create a basic object by invoking Siri. However, I'd like the Siri functionality to be already integrated when the app is downloaded/run for the first time.

The issues I'm having with SiriKit and Shortcuts right now:

You are recommended to "donate" a custom intent whenever correlating functionality is triggered in your mobile app so that Siri can recommend other times to suggest using the shortcut - I would like this to just be standard functionality that I don't need to "donate". I'm dealing with an older targeted user base, and prompting the end user to go into their settings to add the shortcut to Siri and do the additional setup will get lost on a lot of users.

For example:

My application is used for creating and posting simple Plane objects with properties of name & color.

I'd like to allow users to initialize Siri hands-free and create this object like so:

"Hey Siri, create a plane with name Warkhawk and color blue"

The web is saturated with information on these new shortcuts, but I don't like that you have to "donate" the intent when you trigger the functionality in your app, and then go to settings to actually add it to Siri.

How can I utilize Siri to fit this use case without all of the added steps that come with a shortcut?

Thank you!

voo_doo_juju
  • 61
  • 1
  • 8

2 Answers2

1

For a faster and easier way to donate Siri INIntent you can use

INUIAddVoiceShortcutViewController

Works like a UIImagePickerController, it’s a “shortcut" that will bring user directly to the phrase voice record screen. No need to leave your app making it much easier to use.

Example guide

Sore
  • 176
  • 4
  • Thank you! This is way better than forcing a user to go to their settings to set it up. I just wish there was a way to integrate it without this step. But until that is a reality, this will have to do. – voo_doo_juju May 07 '19 at 21:25
  • is there a way to add siri shortcut without using `INUIAddVoiceShortcutViewController`. Means i want to add shortcut without using any `UI` – Sultan Ali Aug 21 '20 at 09:52
  • As far as i know, the user must go through the registration screen, you cannot add a shortcut without the user going through this screen. This way described in that answer I believe is the easiest. Apple always wants to make it very clear what is happening, if this were possible, many applications would go out adding shortcuts without the users knowing it, I know that for those who have good character this ends up being bad, but in total I believe it makes sense. – Sore Aug 24 '20 at 21:23
0

Unfortunately at this time you cannot do what you want without user interaction.

An app can expose Siri Intents in one of the supported intent domains, such as making a VoIP call or making a payment. I don't believe that any of those domains would be suitable for your task.

In iOS 12 an app can donate Siri Shortcuts, as you mentioned. These have a more flexible format in terms of triggering vocabulary but must be set up by the user.

Paulw11
  • 108,386
  • 14
  • 159
  • 186
  • Thanks for the quick response! Since I started messing around with custom intents I've notices you can add parameters. Are you not able to use those with shortcuts? – voo_doo_juju May 07 '19 at 21:22
  • after diving into it some more, it seems that the custom intents are just a way to create flexible shortcuts? It's just confusing why they wouldn't let you create a custom intent and expose that directly through Siri. The only use case I'm seeing for the custom intents is to create dynamic shortcuts. Maybe I'm misunderstanding. – voo_doo_juju May 07 '19 at 22:28
  • Okay, thank you for clearing this up. Where it gets confusing is where custom intents and shortcuts intersect. CUSTOM intents are only useful for dynamically creating shortcuts. Apple's SYSTEM intents, integrated with Siri, have pre-sets for expected parameters that can accept input. Is this correct? – voo_doo_juju May 07 '19 at 22:50
  • Sorry, I have updated my answer. I was confusing myself. Custom intents can have parameters, but at present these cannot be exposed/used by the *Shortcuts* app in iOS. You can use them with custom Intent processing in your app – Paulw11 May 07 '19 at 22:57
  • Okay, that's a bummer. Hopefully we'll get that functionality with iOS 13. Thank you! – voo_doo_juju May 07 '19 at 23:39