Apple On-Device Foundation Models

•
25
•

Integrates Apple's FoundationModels framework into iOS applications for privacy-preserving, on-device AI text generation and tool calling.

This skill provides a comprehensive set of patterns and best practices for leveraging Apple's native on-device language models in iOS 26 and later. It enables developers to implement secure, offline-capable AI features including structured data generation with the @Generable macro, custom tool calling, and real-time snapshot streaming. By following these implementation patterns, developers can ensure their apps adhere to Apple Intelligence's privacy standards while maximizing device-side performance and efficiency, all without the need for cloud-based LLM APIs.

主要功能

01Custom tool calling to link AI responses with domain-specific app logic
02Structured output generation using the @Generable Swift macro for type safety
03On-device text generation and summarization without cloud dependency
04Real-time UI updates via snapshot-based streaming for structured data
0525 GitHub stars
06Built-in patterns for model availability checking and session management

使用场景

01Automating structured data extraction from natural language inputs for form filling or categorization
02Creating offline-capable text summarization or content generation features for mobile apps
03Building privacy-first AI assistants that process sensitive user data entirely on-device