CloudCodeTree LogoCloudCodeTree
HomeResumeAI NewsContactSchedule
CloudCodeTree Logo
CloudCodeTree
← Back to AI NewsClaude ships a Swift package for Apple's Foundation Models — call it in three lines

Claude ships a Swift package for Apple's Foundation Models — call it in three lines

Chris Harper

2 min read

Jun 9, 2026 · 17:00 UTC

AI
Developer Tools
LLM

The WWDC story this week was that Apple's Foundation Models framework went model-agnostic via a new LanguageModel protocol — and Gemini got named first. The concrete follow-through for the rest of us: Anthropic has now published its own Swift package implementing that protocol, available June 9.

What this buys you in practice. Apple's framework already returns typed Swift values through guided generation (@Generable) in as few as three lines — great for fast, local, private tasks like summarization or extraction on the Neural Engine. The Claude package lets you hand those clean, typed outputs off to Claude when a request needs multi-step reasoning or code generation, and — unlike the on-device model — Claude can search the web for current info and execute code for data analysis, then stream the response back into the same SwiftUI view. The framework does the typed-input work, so you arrive at the Claude API call with structured inputs instead of raw user text.

The shape Anthropic shows: a journaling app generates daily prompts on-device, then asks Claude to find threads across months of entries; a study app defines a term locally, then escalates "why does this matter?" to Claude. One UX, the right model per step. Setup is add-the-package, sign in with an Anthropic API key, pass typed outputs through — it handles streaming, tool calls, and structured responses. Works on iOS/iPadOS/macOS/visionOS/watchOS 27. If you ship on Apple platforms, this is the cleanest on-device-to-frontier handoff yet.

Sources: Claude blog: Foundation Models support, Anthropic: Xcode now supports the Claude Agent SDK, Tech Times: Foundation Models swaps providers without code changes