intent 代码现在也可以放在 spm 中吗?
Asked on 06/12/2025
1 search
是的,现在可以将 App Intents 代码放在 Swift 包(SPM)和静态库中。根据 Explore new advances in App Intents 的内容,Apple 允许将 App Intents 代码打包在 Swift 包和静态库中。这一变化使得开发者可以更灵活地组织和共享他们的代码。

Explore new advances in App Intents
Explore all the new enhancements available in the App Intents framework in this year’s releases. Learn about developer quality-of-life improvements like deferred properties, new capabilities like interactive app intents snippets, entity view annotations, how to integrate Visual Intelligence, and much more. We’ll take you through how App Intents is more expressive than ever, while becoming even easier and smoother to adopt. We’ll also share exciting new clients of App Intents this year like Spotlight and Visual Intelligence, and learn to write app intents that work great in those contexts.

Get to know App Intents
Learn about the App Intents framework and its increasingly critical role within Apple’s developer platforms. We’ll take you through a ground-up introduction of the core concepts: intents, entities, queries, and much more. You’ll learn how these pieces fit together and let you integrate your app through Apple’s devices, from software features like Spotlight and Shortcuts to hardware features like the Action button. We’ll also walk through how App Intents is your app’s gateway to integrating with Apple Intelligence going forward.

Platforms State of the Union
Discover the newest advancements on Apple platforms.