# Claude 支持 Apple Foundation Models 框架，推出新 Swift 包

- 来源：Claude：Blog（网页）
- 发布时间：2026-06-08 00:00
- AIHOT 分数：63
- AIHOT 标记：精选
- AIHOT 链接：https://aihot.virxact.com/items/cmq5s35qm01vksl5i8iuvz0zv
- 原文链接：https://claude.com/blog/claude-for-foundation-models

## 精选理由

Apple开发者福音，现在能用Swift原生调用Claude了。端侧模型处理简单任务，复杂推理交给Claude，这才是苹果AI的正确打开方式。

## AI 摘要

Anthropic 通过一个新 Swift 包，让 Apple 开发者能在 Foundation Models 框架中直接调用 Claude。开发者用 Apple 框架以原生 Swift 方式，仅需三行代码即可通过引导生成返回类型化 Swift 值。当请求涉及多步推理、代码生成、联网搜索或数据分析时，Claude 可接手处理，并将流式响应传回同一视图。该支持可在 iOS 27、iPadOS 27、macOS 27、visionOS 27 和 watchOS 27 上使用，开发者需添加包并配置 Anthropic API 密钥。

## 正文

Building intelligent apps for Apple platforms with Claude in the Foundation Models framework

Category

Product announcements

Product

Claude Platform

Claude apps

Date

June 8, 2026

Reading time

5

min

https://claude.com/blog/claude-for-foundation-models

Today we're releasing Foundation Models framework support for Claude through a new Swift package that lets Apple developers use Apple's Foundation Models framework to call Claude for more complex workflows.

Apple’s Foundation Models framework gives developers access to tap into models natively from Swift. It is very easy to use and can return typed Swift values through guided generation in as few as three lines of code. Developers can use this to tap into Apple’s on-device models for fast, local tasks like summarization or extraction.

Developers can now use Apple’s Foundation Models framework to hand off to Claude when a request calls for multi-step reasoning, code generation, and more. Claude can also search the web for current information and execute code for data analysis. Stream Claude's response back into the same view.

Because Apple's framework returns typed Swift values from @Generable annotations, developers arrive at the Claude API call with clean inputs instead of raw user text.

What this unlocks

The Foundation Models framework already powers a range of intelligent on-device features — journaling apps that surface personalized prompts, document apps that summarize contracts, learning apps that explain a concept at a student's level. Adding Claude extends each of those patterns.

A journaling app can generate daily prompts on-device, then ask Claude to find threads across months of entries. A study app can define a term on-device, then hand off to Claude when the student follows up with "why does this matter for everything else we've covered?"

It's one experience for the user, backed by the right model for each step.

Getting started

Claude support with the Foundation Models framework will be available tomorrow and works through Apple's Foundation Models framework on iOS 27, iPadOS 27, macOS 27, and visionOS 27, and watch OS 27. Add it to your project, sign in with an Anthropic API key, and pass typed outputs from Apple's on-device pass into a Claude request — the package handles streaming, tool calls, and structured responses back into your SwiftUI view.

No items found.

Prev

0/5

Next

eBook

FAQ

No items found.

Transform how your organization operates with Claude

See pricing

Contact sales

Get the developer newsletter

Product updates, how-tos, community spotlights, and more. Delivered monthly to your inbox.
