SiriKit 应用在安装应用时出现 "App installation failed" 错误

SiriKit app getting "App installation failed" error while installing app

错误,

This app or an app that it contains has a Siri Intents app extension that declares values in its IntentsRestrictedWhileLocked key's array value that are not in its IntentsSupported key's array value (in the NSExtensionAttributes dictionary in the NSExtension dictionary in its Info.plist).

我在IntentsRestrictedWhileLocked中添加了一项。

所以解决方案是,任何在 IntentsRestrictedWhileLocked 项目中的项目必须在 IntentsSupported

这将要求用户首先解锁 iOS 设备以执行此 Intent INPayUsingApp 的操作。

In the IntentsRestrictedWhileLocked key, add a String item for each intent for which you require the device to be unlocked. Set the value of each item to the class name of the intent.

这将要求用户首先解锁 iOS 设备以执行此 Intent 的操作。

您可能需要在 Siri 和 SiriUI 中添加 IntentsRestrictedWhileLocked Info.plist。

WatchOS Intents Extension 遇到了同样的问题。 在我的 iOS Intents Extension 案例中,我并不支持我在 Watch 上的所有 Intents。更改 iOS Intents 扩展目标的 Info.plist 后,它开始工作。

因此,对于正在构建 WatchOS Intents 扩展的用户,请确保在 iOS 上支持您计划在 Watch OS 上支持的所有 Intents。