
Foundation Models On Device
Apple's FoundationModels framework lets you run LLMs directly on iOS 26+ devices without hitting the cloud. You get text generation, structured output via the @Generable macro (way better than parsing strings), custom tool calling, and snapshot streaming for real-time UI updates. The 4,096 token limit is tight and you can only run one request per session at a time, but the privacy and offline story is solid. Check model.availability before doing anything since not all devices support Apple Intelligence. Best for apps that need AI features without sending user data off device or requiring internet connectivity.
- skills.sh installs
- 5.4K
- GitHub stars
- 300.3K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add affaan-m/ecc --skill foundation-models-on-device --agent claude-codeInstalls into .claude/skills of the current project.
Files
FoundationModels: On-Device LLM (iOS 26)
Patterns for integrating Apple's on-device language model into apps using the FoundationModels framework. Covers text generation, structured output with @Generable, custom tool calling, and snapshot streaming — all running on-device for privacy and offline support.
When to Activate
- Building AI-powered features using Apple Intelligence on-device
- Generating or summarizing text without cloud dependency
- Extracting structured data from natural language input
- Implementing custom tool calling for domain-specific AI actions
- Streaming structured responses for real-time UI updates
- Need privacy-preserving AI (no data leaves the device)
Core Pattern — Availability Check
Always check model availability before creating a session:
struct GenerativeView: View {
private var model = SystemLanguageModel.default
Sponsors
Details
- Repository
- github.com/affaan-m/ecc
- Categories
- Testing & QA, AI & Agent Building, Mobile Development
- First seen
- Jul 14, 2026
More from affaan-m/ecc
All 263- Network Interface Health5.4K
- Netmiko Ssh Automation5.4K
- Swift Concurrency 6 25.4K
- Opensource Pipeline5.4K
- Plankton Code Quality5.4K
- Defi Amm Security5.4K
- Gan Style Harness5.4K
- Homelab Pihole Dns5.4K
- Returns Reverse Logistics5.4K
- Benchmark Optimization Loop5.4K
- Customer Billing Ops5.4K
- Openclaw Persona Forge5.4K
- Google Workspace Ops5.4K
- Hookify Rules5.4K
- Connections Optimizer5.4K
- Swift Protocol Di Testing5.4K
- Energy Procurement5.4K
- Swift Actor Persistence5.4K
- Quarkus Security5.4K
- Social Graph Ranker5.4K
- Network Bgp Diagnostics5.4K
- Visa Doc Translate5.4K
- Flox Environments5.4K
- Unified Notifications Ops5.4K