如何创建一个Siri Intent来接受用户传递的输入 [英] How to create a Siri Intent that accepts input passed from user

查看:334
本文介绍了如何创建一个Siri Intent来接受用户传递的输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用如下参数创建了一个自定义Intent:

I created a custom Intent with parameters like so:

我捐赠了:

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

它正确显示:

但是,我想要一个可以接受用户输入的Intent.例如,Messages.app:

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

如何配置我的自定义意图以处理输入?

How do I configure my custom Intent to handle input?

推荐答案

据我所知,此功能不适用于第三方快捷方式-我的意思是,这些快捷方式不是由构建该快捷方式的团队定义的Siri快捷方式(以前称为工作流程")应用程序.所有第三方快捷方式在快捷方式"应用程序中均显示以下文本:

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.

令人困惑的是,这些内置快捷方式通常针对第三方应用程序,例如Instagram或Overcast.很难分辨应用程序开发人员已添加了哪些应用程序的快捷方式,工作流程开发人员已添加了哪些应用程序的快捷方式.

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.

A.

参考:

快捷方式:新Mac Stories上的Siri和iOS Automation视觉:

从到目前为止的经验来看,iOS 12中的Siri目前不支持将输入消息传递到使用用户短语激活的自定义快捷方式的功能,并且不太可能在iOS 12的第一个版本.这意味着Siri只会是自定义快捷方式的启动器,而不是可以在运行时传递用户命令用于特定参数的实际界面.

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.

此外,此推文:

关于iOS 12快捷键的内容.工作流在获得输入后不断发展,并将变量传递给链下的其他动作.但是第三方Siri快捷方式不允许输入或输出任何数据.

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.

这篇关于如何创建一个Siri Intent来接受用户传递的输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆