如何在不提供意图或使用快捷方式的情况下利用 Siri 创建自定义对象? [英] How can I utilize Siri to create a custom object without donating intents or using shortcuts?

查看:21
本文介绍了如何在不提供意图或使用快捷方式的情况下利用 Siri 创建自定义对象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

*使用 Swift 4.2 &Xcode 10.2

*Using Swift 4.2 & Xcode 10.2

我试图通过允许用户免提创建对象来使我的应用程序功能更加丰富.该应用程序旨在使某些对象的创建更容易,因此允许用户通过调用 Siri 创建基本对象会很棒.但是,我希望在第一次下载/运行应用程序时已经集成了 Siri 功能.

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.

我现在在使用 SiriKit 和快捷方式时遇到的问题:

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

每当您的移动应用程序中触发相关功能时,建议您捐赠"自定义意图,以便 Siri 可以推荐其他时间建议使用快捷方式 - 我希望这只是我不需要的标准功能捐赠".我正在处理一个较老的目标用户群,并提示最终用户进入他们的设置,将快捷方式添加到 Siri 并进行额外的设置,这会让很多用户迷失方向.

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.

例如:

我的应用程序用于创建和发布具有 name & 属性的简单 Plane 对象.颜色.

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

我想允许用户免提初始化 Siri 并像这样创建这个对象:

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

嘿 Siri,创建一架名为 Warkhawk 且颜色为蓝色的飞机"

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

网络上充斥着有关这些新快捷方式的信息,但我不喜欢您在触发应用程序中的功能时必须捐赠"意图,然后转到设置将其实际添加到 Siri.

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.

如何在没有快捷方式附带的所有添加步骤的情况下利用 Siri 来适应此用例?

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

谢谢!

推荐答案

很遗憾,目前您无法在没有用户交互的情况下做您想做的事.

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

应用可以在其中一个受支持的意图域中公开 Siri Intents/a>,例如拨打 VoIP 电话或付款.我认为这些域中的任何一个都不适合您的任务.

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.

正如您所提到的,在 iOS 12 中,应用程序可以捐赠 Siri Shortcuts.这些在触发词汇方面具有更灵活的格式,但必须由用户设置.

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.

这篇关于如何在不提供意图或使用快捷方式的情况下利用 Siri 创建自定义对象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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