SuperAPI AI 工具集

app-intents

通用与其它

查看项目

更新于 10-16 09:52

技能介绍

用途:该技能用于为 Apple 平台应用实现 App Intents 框架集成,把应用功能暴露给 Siri、快捷指令、Spotlight 与 Apple Intelligence。适用时机包括需要 Siri/快捷指令集成、Spotlight 内容索引、语音短语、交互式 Siri 结果、前台/后台意图模式、视觉智能集成、屏幕实体支持及 Swift Package 共享意图。

主要能力:覆盖 AppIntent 协议与 @Parameter 宏定义动作和参数;AppShortcutsProvider 创建语音短语;AppEntity、IndexedEntity、@Property(indexingKey:) 实现 Spotlight 实体索引;意图模式 supportedModes 与 continueInForeground();.result(view:) 与 SnippetIntent 交互式结果;requestChoice(between:) 呈现选择;IntentValueQuery 视觉智能搜索;.userActivity() 屏幕实体关联;@ComputedProperty、@DeferredProperty;AppIntentsPackage 共享;@AppIntent(schema:)、@AssistantIntent 使 Siri 可执行;IntentDialog 自定义对话;IntentDonationManager;OwnershipProvidingEntity;UndoableIntent;Transferable、FileEntity 导出实体。

使用方式:先确定要暴露的动作、需索引内容、是否需交互片段与前台 UI,再按需加载 intents-basics.md、entities-spotlight.md、advanced-features.md 参考文件,套用其中模式并检查常见错误。

限制:各 API 有最低系统要求,如 AppIntent/AppEntity/AppShortcutsProvider 需 iOS 16/macOS 13,IndexedEntity 需 iOS 18/macOS 15,意图模式、SnippetIntent、requestChoice 等需 iOS 26/macOS 26。App Shortcuts 上限 10 个,交互片段内容高度上限 340pt,SnippetIntent 的 perform() 不应改变状态。资料未提供具体收费、价格或安装命令信息。