Apple On-Device Foundation Models

•
5
•

Integrates Apple's FoundationModels framework into iOS applications to enable privacy-focused, offline-capable generative AI features.

This skill provides specialized patterns and best practices for implementing Apple's on-device FoundationModels framework in iOS 26+ environments. It guides developers through critical implementation details such as model availability checking, structured data extraction using the @Generable macro, and custom tool calling. By leveraging these patterns, developers can create highly responsive, privacy-preserving AI features that function without cloud dependencies, including real-time snapshot streaming for UI updates and complex multi-turn conversational interfaces, all while navigating the 4,096 token context window constraint.

Key Features

01Custom tool calling to bridge AI logic with domain-specific app code
02On-device LLM execution for maximum user privacy and offline support
03Real-time snapshot streaming for responsive, incremental UI updates
045 GitHub stars
05Comprehensive model availability and device eligibility handling
06Structured output generation using the type-safe @Generable macro

Use Cases

01Extracting structured objects like calendar events or profiles from raw text input
02Building privacy-sensitive AI assistants that process user data strictly on-device
03Implementing offline-first AI features for travel, field work, or secure environments