ai-ml

Apple Foundation Models Framework 2026: Claude & Gemini

June 18, 2026

Apple Foundation Models Framework 2026: Claude & Gemini

At WWDC 2026 Apple opened its Foundation Models framework to third-party clouds. The same Swift API that drives Apple's on-device model now also talks to Claude and Gemini through a new public LanguageModel protocol, so you can swap providers by changing a dependency — not your session code.12

TL;DR

  • Apple's Foundation Models framework — the native Swift API introduced at WWDC 2025 — now works with any model that conforms to the new public LanguageModel protocol, including Apple's own models, Anthropic's Claude, and Google's Gemini.12
  • Providers ship as Swift packages. Anthropic published ClaudeForFoundationModels (Apache-2.0, beta) and Google made Gemini available through the Firebase Apple SDK, both reachable through the same LanguageModelSession API.32
  • If you're in the App Store Small Business Program and your app has fewer than 2 million total first-time downloads, you can call Apple's next-generation models on Private Cloud Compute at no cloud API cost.1
  • The 2026 release adds multimodal image input, on-device Vision tools (OCR, barcodes), Dynamic Profiles for swapping models mid-session, and an Evaluations framework.1
  • Apple says it will open-source the framework "later this summer." Everything ships against the iOS/iPadOS/macOS/visionOS/watchOS 27 betas and Xcode 27.34

What You'll Learn

  • What changed in the Foundation Models framework at WWDC 2026
  • How the new LanguageModel provider protocol lets you swap on-device, Apple cloud, Claude, and Gemini
  • How to call Claude from Swift with Anthropic's official package
  • How Gemini plugs in through Firebase, and how to use it in Xcode
  • Who qualifies for the free Private Cloud Compute tier
  • What the third-generation Apple Foundation Models actually are

What changed at WWDC 2026

The Foundation Models framework is a native Swift API that gives you direct access to the same on-device model that powers Apple Intelligence. Apple shipped it in 2025 for on-device inference. The 2026 update keeps that local model but widens the framework into a single front end for any provider: "You can now work with any language model, including Apple Foundation Models, cloud models like Claude and Gemini, or any other provider that conforms to the Language Model protocol."1

The mechanism is a new public LanguageModel protocol. Starting with iOS 27, iPadOS 27, macOS 27, visionOS 27, and watchOS 27, model providers implement that protocol to expose a common inference surface, and your app drives whatever sits behind it with the existing LanguageModelSession API.2 In practice that means a team can prototype against the free on-device model, then route harder prompts to Claude or Gemini — or switch between them — by updating a Swift Package Manager dependency, with no changes to session logic.32

Three other additions matter for app builders. Multimodal prompts let you pass images alongside text, and Vision framework tools like OCR and barcode reading are available for the model to call directly, all on-device. Dynamic Profiles let you swap models, tools, and instructions on the fly so behavior can adapt within one continuous session. And the new Evaluations framework lets you verify AI features behave correctly across dynamic conditions, going beyond what unit tests catch.1

The free Private Cloud Compute tier

The headline for small developers is cost. If you're enrolled in the App Store Small Business Program and your app has fewer than 2 million total first-time App Store downloads, you can access the next generation of Apple Foundation Models running on Private Cloud Compute at no cloud API cost.1 Private Cloud Compute is Apple's server tier that, by design, never stores or shares user data — not even with Apple.5

That free server option sits a tier above the on-device model. According to WWDC session coverage, the on-device model's context window stays around 4,096 tokens (a shared input-plus-output budget), while the Private Cloud Compute model raises that ceiling to roughly 32K and adds stronger reasoning — useful when a request is too large or too complex for the local model.6 Treat those token figures as reported from session walkthroughs rather than published spec-sheet numbers, and confirm against the betas before you architect around them.

Calling Claude from Swift

Anthropic shipped an official Swift package, anthropics/ClaudeForFoundationModels, under the Apache-2.0 license. It's explicitly beta — it targets the server-side language model API introduced in the OS 27 betas, and the APIs may change before general availability. You need an OS 27 beta target, Xcode 27, and an Anthropic API key for development.3

The package conforms Claude to the framework's LanguageModel protocol, so you drive it with the same LanguageModelSession you use for Apple's on-device model:

import FoundationModels
import ClaudeForFoundationModels

let model = ClaudeLanguageModel(
  name: .sonnet4_6,
  auth: .apiKey(ProcessInfo.processInfo.environment["ANTHROPIC_API_KEY"] ?? "")
)

let session = LanguageModelSession(model: model)
let response = try await session.respond(to: "Plan a 4-day trip to Buenos Aires.")
print(response.content)

The on-device path is the same shape — let session = LanguageModelSession() defaults to Apple's local model — so moving a prompt from on-device to Claude is a one-line change to how you build the session. Model identifiers are constants on ClaudeModel that mirror the API IDs (.sonnet4_6 is claude-sonnet-4-6, .opus4_8 is claude-opus-4-8).3

Streaming and structured output work through the standard framework surfaces. Annotate a type with @Generable and request it with generating::

@Generable
struct Trip {
  @Guide(description: "Destination city") var destination: String
  @Guide(description: "Length in days") var days: Int
}

let response = try await session.respond(
  to: "Plan a trip to Tokyo.",
  generating: Trip.self
)
print(response.content.destination)

The package also exposes Anthropic's server-side tools — web search, web fetch, and code execution — configured per model with serverTools:, distinct from the framework's client-side tools: array.3 Anthropic notes the package is maintained on a best-effort basis and isn't accepting external contributions, so plan for that support posture in production.

Calling Gemini from Swift and Xcode

Google's side of the integration arrived the same week. Cloud-hosted Gemini models plug into the Foundation Models framework through the Firebase Apple SDK, built on Firebase AI Logic — a managed service that lets you call Gemini from iOS, iPadOS, macOS, and visionOS apps without running your own backend, with Firebase App Check protecting the API. Because Gemini sits behind the same LanguageModel protocol as the on-device model, Google describes switching as "a small code change: swap the model instance."2 Google shipped this as a preview release beginning the day after the WWDC announcement.2

Google also wired Gemini into Xcode itself. You onboard through the Intelligence settings panel, after which Gemini provides an agentic experience for reviewing code, fixing bugs, and building features without leaving the IDE. Individual developers authenticate with a self-serve Gemini API key from Google AI Studio — which has a free tier plus paid access for higher volumes — while enterprises use the Gemini Enterprise Agent Platform for dedicated quotas and data-privacy controls.2

Provider options at a glance

ProviderHow it plugs inWhere it runsCost to start
Apple on-device modelBuilt inOn deviceFree
Apple cloud (Private Cloud Compute)Built inApple PCC serversFree for Small Business Program apps under 2M downloads1
ClaudeClaudeForFoundationModels Swift package (beta)3Anthropic APIAnthropic API key (dev)
GeminiFirebase Apple SDK / Firebase AI Logic (preview)2Google CloudFree tier via Google AI Studio key

Each cell here reflects the providers' own announcements; the framework's value is that your LanguageModelSession code stays identical across all four rows.

What the third-generation Apple models actually are

The models behind this are Apple's third generation of Foundation Models (AFM), announced June 8, 2026 — a family of five models custom-built in collaboration with Google.5 Two run on device: AFM 3 Core, a 3-billion-parameter dense model, and AFM 3 Core Advanced, a natively multimodal 20-billion-parameter sparse model that activates just 1 to 4 billion parameters at a time. Three run on Private Cloud Compute: AFM 3 Cloud (the server workhorse), ADM 3 Cloud (image generation and editing), and AFM 3 Cloud Pro (the most capable, aimed at agentic tool use and complex reasoning, running on NVIDIA GPUs in Google Cloud).5

Apple's human evaluations show clear generational gains. In side-by-side comparisons of general text, AFM 3 Cloud was preferred on 64.7% of prompts versus 8.7% for the 2025 AFM server model, and AFM 3 Core was preferred on 45.6% versus 23.3% for its 2025 baseline.5 Apple says a fuller technical report with updated benchmarks is coming later this summer, so treat these as model-level preference rates rather than public benchmark scores.5

Open source, with a caveat

Apple stated it will open-source the Foundation Models framework "later this summer," which would let the same Swift APIs run server-side for an end-to-end workflow wherever Swift is deployed.4 It has already published FoundationModelsUtilities, an Apache-2.0 Swift package that adds custom skills, context-management helpers, and a chat-completions client for hosted models — and it runs on Apple platforms plus select Linux distributions like Ubuntu.7 WWDC session coverage also describes companion backends for running custom weights and open-source MLX-community models locally on Apple silicon. But as of mid-June 2026 the full framework open-source release is a stated commitment with a timeline, not a shipped artifact — so verify availability before you build a deployment plan around it.4

If you're weighing Apple's models against the cloud options, our breakdown of Gemini 3.5 Flash benchmarks and pricing and our guide to Claude prompt caching in TypeScript cover the economics of the two third-party providers. For the consumer-facing side of this announcement, see everything Apple announced about Siri AI at WWDC 2026.

The Bottom Line

The real shift at WWDC 2026 isn't a new model — it's that Apple turned its on-device API into a provider-agnostic front end. Write to LanguageModelSession once and you can run on Apple's free on-device model, Apple's free Private Cloud Compute tier (if you qualify), Claude, or Gemini, switching by dependency rather than rewrite. The honest caveats: the third-party packages are beta and tied to the OS 27 betas, the open-source framework is a summer promise rather than a shipping release, and the headline token and preference numbers come from session walkthroughs and Apple's own evaluations — so pin them against the betas and the forthcoming technical report before you commit an architecture.

Footnotes

  1. Apple Developer, "WWDC26 Apple Intelligence guide." https://developer.apple.com/wwdc26/guides/apple-intelligence/ 2 3 4 5 6 7 8 9 10

  2. Google, "Bringing the latest Gemini models to Apple developers," The Keyword (blog.google), June 8, 2026. https://blog.google/innovation-and-ai/technology/developers-tools/bringing-gemini-models-to-apple-developers/ 2 3 4 5 6 7 8 9 10 11

  3. Anthropic, "ClaudeForFoundationModels" (README), GitHub. https://github.com/anthropics/ClaudeForFoundationModels 2 3 4 5 6 7 8 9

  4. Apple's open-source commitment for the Foundation Models framework, as reported from the WWDC 2026 Platforms State of the Union. MacRumors, "Apple Outlines Major AI and Developer Tool Updates at 2026 Platforms State of the Union," June 9, 2026. https://www.macrumors.com/2026/06/09/apple-outlines-major-ai-and-developer-tool-updates/ 2 3

  5. Apple Machine Learning Research, "Introducing the Third Generation of Apple's Foundation Models," June 8, 2026. https://machinelearning.apple.com/research/introducing-third-generation-of-apple-foundation-models 2 3 4 5 6

  6. "Integrating Apple's Server LLM on Private Cloud Compute (PCC)," Dev|Journal (earezki.com), June 13, 2026, summarizing WWDC26 session 319, "Build with the new Apple Foundation Model on Private Cloud Compute." https://developer.apple.com/videos/play/wwdc2026/319/

  7. Apple, "foundation-models-utilities" (README), GitHub. https://github.com/apple/foundation-models-utilities 2

Frequently Asked Questions

Yes. At WWDC 2026 Apple added a public LanguageModel protocol that third-party providers implement. Anthropic ships an official Swift package for Claude, and Google makes Gemini available through the Firebase Apple SDK. Both are driven by the same LanguageModelSession API as Apple's on-device model. 1 3 2