using on device ai in my app
Asked on 2025-06-11
1 search
To integrate on-device AI into your app, Apple provides several frameworks and tools that you can leverage. Here are some key points from the WWDC sessions:
-
Core ML Framework: This is the most commonly used framework for running AI models on iOS, iPadOS, and macOS. You can import and run on-device AI models, such as large language or diffusion models, using Core ML. It optimizes hardware-accelerated execution across the CPU, GPU, and neural engine. You can start with any PyTorch model and convert it into the Core ML format using Core ML tools, which offer optimization techniques like quantization and efficient key-value caching in LLMs. Platforms State of the Union
-
Foundation Models Framework: This framework allows you to tap into highly optimized on-device foundation models. It provides APIs for natural language processing, sound analysis, speech understanding, and vision intelligence. You can use these models to enhance your app's features with AI capabilities. Discover machine learning & AI frameworks on Apple platforms
-
Create ML: This tool allows you to bring in additional data for training and extend existing models. For example, if you have a unique dataset of images, you can augment Apple's image models with your data to improve classification and object detection. Platforms State of the Union
-
Privacy and Offline Capabilities: On-device AI ensures that user data stays private and doesn't need to be sent to a server. The AI features work offline, eliminating the need for account setup or API keys. Code-along: Bring on-device AI to your app using the Foundation Models framework
For more detailed guidance, you might want to explore the session Discover machine learning & AI frameworks on Apple platforms, which provides an overview of the tools and APIs available for integrating AI into your apps.

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

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.

Discover machine learning & AI frameworks on Apple platforms
Tour the latest updates to machine learning and AI frameworks available on Apple platforms. Whether you are an app developer ready to tap into Apple Intelligence, an ML engineer optimizing models for on-device deployment, or an AI enthusiast exploring the frontier of what is possible, we’ll offer guidance to help select the right tools for your needs.