Explain how I can leverage the new Foundation Models Framework to bolster app intents and shortcuts in my app
Asked on 06/13/2025
1 search
To leverage the new Foundation Models Framework to bolster app intents and shortcuts in your app, you can follow these steps:
-
Foundation Models Framework Overview: The Foundation Models Framework provides access to an on-device large language model through a Swift API. This model is optimized for tasks like content generation, text summarization, and user input analysis, all while maintaining privacy since it runs on-device. You can use this framework to enhance existing app features or create new ones, such as generating itineraries in a travel app or creating dialogue for game characters. For more details, you can refer to the session Meet the Foundation Models framework.
-
Integrating with App Intents: App Intents allow your app to integrate its features across the system, including Shortcuts and Spotlight. By exposing your app's content as entities and using actions like the new "UseModel" action, you can make your app's features more accessible and useful. This involves defining app intents and entities that describe your app's core functions, which can then be used in various system features like Siri, Spotlight, and Shortcuts. For more information, see the session Develop for Shortcuts and Spotlight with App Intents.
-
Prompt Engineering and Tool Calling: When using the Foundation Models Framework, start with prompt engineering to perfect your prompts. You can use Xcode's Playground for this purpose. Additionally, the framework supports tool calling, which allows the model to autonomously choose and call functions to fetch additional information or perform actions, enhancing the model's capabilities. This is particularly useful for creating intelligent features that require external data or actions. For a practical demonstration, check out the session Code-along: Bring on-device AI to your app using the Foundation Models framework.
By combining the capabilities of the Foundation Models Framework with App Intents, you can create a more intelligent and integrated app experience that leverages Apple's on-device AI capabilities.

Meet the Foundation Models framework
Learn how to tap into the on-device large language model behind Apple Intelligence! This high-level overview covers everything from guided generation for generating Swift data structures and streaming for responsive experiences, to tool calling for integrating data sources and sessions for context management. This session has no prerequisites.

Code-along: Bring on-device AI to your app using the Foundation Models framework
Develop generative AI features for your SwiftUI apps using the Foundation Models framework. Get started by applying the basics of the framework to create an awesome feature. Watch step-by-step examples of how to complement the models with tools you build, stream results, and apply further optimizations for great performance.

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