Apple On-Device FoundationModels
Integrates Apple's on-device language models into Swift applications for private, offline AI capabilities.
This skill provides comprehensive patterns and best practices for implementing the Apple FoundationModels framework in iOS development. It guides developers through setting up on-device text generation, utilizing the @Generable macro for type-safe structured output, and creating custom tool calls. Designed for iOS 26 and later, it emphasizes privacy-first AI by keeping data on the device, managing session availability, and handling hardware-specific constraints like the 4,096-token context window. Whether building offline summarization tools or real-time streaming UI, this skill ensures robust integration with Apple Intelligence.
Key Features
01Snapshot-based streaming for real-time UI updates with partial results
020 GitHub stars
03Best practices for managing the 4,096-token local context window
04Implementation of @Generable for type-safe, structured AI data extraction
05On-device tool calling patterns for domain-specific logic execution
06Strict availability checking to handle hardware and setting requirements
Use Cases
01Developing offline-capable text summarization and content generation tools
02Converting natural language user input into structured Swift data models
03Building privacy-focused apps where AI processing must stay on-device