9

I created a custom Intent with parameters like so:

enter image description here

I've donated it:

let intent = PlayIntent()
intent.color = color
let interaction = INInteraction(intent: intent, response: nil)
interaction.donate()

and it shows up correctly:

enter image description here

However, I'd like an Intent which accepts input from the user. Example, Messages.app:

enter image description here

How do I configure my custom Intent to handle input?

David Albers
  • 253
  • 4
  • 10
  • Did you look at creating an "Intents UI Extension" in addition to a "Intents Extension"? Maybe this [link](https://medium.com/@pietropizzi/a-beginners-guide-to-developing-custom-intent-siri-shortcuts-for-ios-12-a3627b7011af) can be helpful to you. – Anton Sep 28 '18 at 09:17

1 Answers1

2

As far as I can tell, this functionality is not available for third-party shortcuts - by which I mean, the shortcuts not defined by the team who built the Siri Shortcuts (previously Workflow) app. All third party shortcuts show in the Shortcuts app with the text:

This action passes input through as output.

Confusingly, these built-in shortcuts often target third party apps, like Instagram or Overcast. It can be hard to tell which apps' shortcuts have been added by the app developers, and which have been added by the Workflow developers.

Alas.


References:

Shortcuts: A New Vision for Siri and iOS Automation on Mac Stories:

From what I've been able to gather so far, Siri in iOS 12 doesn't currently support the ability to pass an input message to a custom shortcut activated with a user phrase, and it's unlikely to gain such functionality in the first version of iOS 12. This means that Siri will only be a launcher for custom shortcuts, not an actual interface that can pass user commands for specific parameters at runtime.

Also, this tweet:

Here’s the thing about iOS 12 W̶o̶r̶k̶f̶l̶o̶w̶ Shortcuts. Workflow thrives on getting input, and passing along variables to other actions down the chain. But third-party Siri Shortcuts don’t allow for any data input or outputs.

Andrew Bennet
  • 2,600
  • 1
  • 21
  • 55
  • 1
    Looks like you're right. The third party apps with input/output shortcuts also have `x-callback-url` schemes with the same functionality ([example](https://onetapless.com/library/overcast)). Presumably, that's the underlying system Shortcuts/Workflow are using. They just wrapped it in a pretty UI for specific apps. – David Albers Sep 30 '18 at 17:05