如何创建接受用户传递的输入的 Siri Intent
How to create a Siri Intent that accepts input passed from user
我创建了一个带有如下参数的自定义 Intent:
我捐了:
let intent = PlayIntent()
intent.color = color
let interaction = INInteraction(intent: intent, response: nil)
interaction.donate()
它正确显示:
但是,我想要一个接受用户输入的 Intent。例如,Messages.app:
如何配置我的自定义 Intent 来处理输入?
据我所知,此功能不适用于第三方快捷方式 - 我的意思是,快捷方式不是由构建 Siri 快捷方式(以前称为 Workflow)应用程序的团队定义的。所有第三方快捷方式都显示在快捷方式应用程序中,文本为:
This action passes input through as output.
令人困惑的是,这些内置快捷方式通常针对第三方应用程序,如 Instagram 或 Overcast。很难分辨哪些应用程序的快捷方式是由应用程序开发人员添加的,哪些是由工作流开发人员添加的。
唉。
参考文献:
Shortcuts: A New Vision for Siri and iOS Automation Mac 个故事:
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.
此外,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.
我创建了一个带有如下参数的自定义 Intent:
我捐了:
let intent = PlayIntent()
intent.color = color
let interaction = INInteraction(intent: intent, response: nil)
interaction.donate()
它正确显示:
但是,我想要一个接受用户输入的 Intent。例如,Messages.app:
如何配置我的自定义 Intent 来处理输入?
据我所知,此功能不适用于第三方快捷方式 - 我的意思是,快捷方式不是由构建 Siri 快捷方式(以前称为 Workflow)应用程序的团队定义的。所有第三方快捷方式都显示在快捷方式应用程序中,文本为:
This action passes input through as output.
令人困惑的是,这些内置快捷方式通常针对第三方应用程序,如 Instagram 或 Overcast。很难分辨哪些应用程序的快捷方式是由应用程序开发人员添加的,哪些是由工作流开发人员添加的。
唉。
参考文献:
Shortcuts: A New Vision for Siri and iOS Automation Mac 个故事:
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.
此外,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.