捐赠后快捷应用程序中出现重复操作 INInteraction

发布于 2025-01-12 22:25:56 字数 414 浏览 2 评论 0原文

我使用 SiriKit 意图定义文件创建了自定义 INIntent,没有参数,它只是假设导航到我的应用程序中的特定流程。我选择了“可在快捷方式中配置”,因为我希望它可以在快捷方式应用程序的操作中使用。

当用户在我的应用程序中使用该流程时,我捐赠有关操作的系统:

let intent = MyIntent()
let interaction = INInteraction(intent: intent, response: nil)
interaction.donate(completion: nil)

问题是现在我在快捷方式应用程序中有两个相同的建议。一个来自配置文件,第二个在我调用捐赠时出现。如果我取消选中“可在快捷方式中配置”,则只会有一个,但我希望用户将其列在操作中,即使他还没有这样做。我可能会犯什么错误,导致操作重复?

I created custom INIntent using SiriKit Intent Definition File, with no parameter, it is just suppose to be navigation to specific flow in my app. I selected 'Configurable in Shortcuts' as I want it to available in actions in Shortcut App.

When user is using that flow in my app I donate system about action:

let intent = MyIntent()
let interaction = INInteraction(intent: intent, response: nil)
interaction.donate(completion: nil)

The problem is that now I have two the same suggestions in Shortcut App. One is coming from configuration file and the second appears when I call donate. If I uncheck 'Configurable in Shortcuts' there will be only one but I want user to have it listed in actions even if he hasn't make it yet. What I'm potential making wrong that action is duplicated?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文