Fatbobman's Swift Weekly #122
Xcode Enters the Agent Era

Xcode Enters the Agent Era
Although Apple had already incorporated AI-assisted programming capabilities in the initial version of Xcode 26, the experience felt more like ChatGPT being awkwardly embedded into the IDE: the functionality existed, but felt disconnected. Compared to the then-popular Cursor, it seemed like a product from a different era. As AI CLI tools like Claude Code gradually matured, Xcode appeared to fall further behind, leading many developers to question whether it could still serve as a “primary IDE” in the AI age.
The arrival of version 26.3, with almost no advance notice, responded to these doubts with concrete action. By integrating Claude Code/Codex, Apple’s answer was direct: with the right strategy, Xcode remains a highly promising development environment within the Apple ecosystem. This time, Xcode didn’t simply add a CLI tool panel; instead, it introduced a native set of Xcode Tools (MCP), coordinated with official technical documentation for Swift 6, SwiftUI, SwiftData, and more, creating a highly consistent experience aligned with the latest practices. Even for developers already proficient with CLI + XcodeBuildMCP + various Skills, this native solution remains highly competitive—especially with its near-zero configuration cost, which is significant for the vast majority of developers.
More notably, the Xcode Tools provided in this update don’t just serve Xcode itself; they can also function as standard MCP to provide capabilities for other AI tools. This open approach doesn’t entirely align with the outside world’s impression of Apple’s usual style.
Of course, from today’s vantage point, we cannot yet assert that Xcode has returned to the first tier. But what’s certain is that 26.3 has sent a very clear signal: Apple is willing to collaborate with mainstream tools and services to create development experiences that truly align with the times. For this reason, I have higher expectations for the next iteration of Siri—likely in iOS 27, Apple will provide more standardized interfaces for the system and apps beyond the existing Intent framework, allowing AI to integrate more naturally into the entire ecosystem.
Xcode + Agent is just the beginning.
Apple + Agent is the future worth paying more attention to.
Previous Issue|Newsletter Archive
📢 Sponsor Fatbobman’s Swift Weekly
Promote your product to Swift & iOS developers across:
- Blog: 50,000+ monthly visitors
- Newsletter: 4,000+ subscribers, 53% open rate
Perfect for developer tools, courses, and services.
Enjoyed this issue? Buy me a coffee ☕️
Original
Xcode 26.3 + Claude Agent: Model Swapping, MCP, Skills, and Adaptive Configuration
Xcode 26.3 directly provides support for Claude Code/Codex. Finally, developers can conveniently use native AI Agents in Xcode. Over the past few days, I’ve conducted a series of experiments with the new version, including how to use the latest models, configure MCPs/Skills/Commands, and write adaptive CLAUDE.md. This article uses Claude Code as an example to share some tips beyond the documentation.
Recent Recommendations
From Pixel Capture to Metadata: Reimagining Screen Recording Architecture on macOS
Video is replacing text as a more popular form of expression, and good tools accelerate creation. Sintone, developer of the macOS screen recording software ScreenSage Pro, provides an in-depth retrospective on implementing “finished editing upon recording completion” based on ScreenCaptureKit and Metal. From solving the cryptic SCK -3821 error to migrating from ObservableObject to @Observable to optimize timeline performance, this article openly shares the entire process from pixel capture to high-performance composition.
Which Method is Fastest for Checking if a String is in a Whitelist: Set, Array, Enum, Dictionary, or Switch?
In Swift, checking whether a string belongs to a set of keys can be written as Set.contains, Array.contains, RawRepresentable enum’s init?(rawValue:), switch with multiple cases, or even using a Dictionary for mapping. They may look similar, but when placed in performance-sensitive paths, the results might not fully align with intuition. Helge Heß conducted a simple benchmark test: Set.contains leads without suspense, followed by enum(rawValue:) and Dictionary (very close to each other); while switch, which many would instinctively overestimate, actually ranks after enum, with Array.contains finishing last. As a small experiment, these results might be just what we need to calibrate our intuition about Swift performance.
Migrating an iOS app from Paid up Front to Freemium
Paid download and free + in-app purchase are two fundamentally different business models, and as apps evolve, developers may need to transition between them. In this article, Donny Wals shares his complete experience converting the Practical Core Data app from a $4.99 paid download to freemium. The article not only covers StoreKit 2 technical implementation details (purchase flow, state management, family sharing), but more valuably, his deep thinking on business decisions: while the paid barrier can filter for serious users, it also blocks many potential users from experiencing the product’s value. For educational or utility indie apps, freemium may be a better balance between user growth and revenue.
On-demand resources in iOS app
App size has always been a concern for developers, especially when apps contain large amounts of images, audio, or other resources. Although Apple introduced On-Demand Resources (ODR) in iOS early on to address this challenge, this feature has a weak presence and is often overlooked by developers. In this article, Majid Jabrayilov systematically reviews ODR’s working mechanism and usage, including resource grouping, tag management, download lifecycle, and collaboration with system caching strategies.
While Apple is promoting Background Assets as a more modern solution, ODR still has unique value in scenarios requiring immediate response for on-demand downloads and fine-grained resource control.
Objectively Better, Observably Trickier
When fully embracing the Observation framework, developers need to be aware that its working mechanism differs from Combine’s @Published, and simple replacement often introduces subtle issues. Danny Bolella summarizes four common pitfalls during migration: non-lazy initialization when @State holds reference types, update loss caused by nested @Observable objects, changes in array element binding methods, and conflicts with other property wrappers. The article provides solutions through clear code examples and repeatedly emphasizes a core principle: updates only trigger when properties currently being accessed (getter called) by the view change. Understanding and adapting to this “lazy observation” mindset is key to correctly using the Observation framework.
Add an Open Recent Menu to a SwiftUI app
“Open Recent” is a standard macOS app feature, but for SwiftUI developers, correctly implementing this functionality is not intuitive. In this article, Mark Szymczyk demonstrates through a concise example how to use NSDocumentController to integrate system-level recent file management capabilities into your app: automatic list maintenance, menu updates, and seamless coordination with document lifecycle. For document or utility apps, this is a low-cost detail optimization that can significantly enhance the “native feel.”
Tools
Radioform: A Native, Open-Source macOS Audio Equalizer
macOS has long lacked a system-level audio equalizer. Radioform, developed by Matthew Porteous, fills this gap. The project employs a layered architecture of SwiftUI menu bar App + Swift Host + CoreAudio HAL Driver + C++ DSP, completely decoupling UI from real-time audio processing. The DSP portion implements 10-band parametric EQ, parameter smoothing, limiting, and real-time safety control; the engineering also includes complete CI, code signing notarization, and DMG release workflow. This isn’t a “just make it work” demo, but a production-grade audio engineering template approaching long-term maintainability.
CircuitPro: Native macOS PCB Design Tool
This is a domain rarely explored by macOS native apps: PCB design. CircuitPro is a PCB EDA tool for macOS, aiming to make schematic, layout, and component library workflows more aligned with Apple platform conventions. (The project is still in early development stages)
What attracts me most about the project is the custom-built CanvasKit. It’s more like a 2D interaction engine for EDA scenarios rather than just a regular canvas component: the top layer is declarative CanvasView, the middle layer is the state hub CanvasController, and the bottom layer is input routing, render tree, and tool system. More critically, snapping, input handling, and wiring engine are all made into protocol-based pluggable points, allowing schematics and layout to share the same infrastructure while retaining their respective routing rules.
Even if you’re not interested in PCB design itself, CircuitPro is worth attention, especially for its engineering practices in SwiftUI + AppKit hybrid architecture.
Thanks for reading Fatbobman’s Swift Weekly! This post is public so feel free to share it.
Xcode 迈入 Agent 时代
尽管在 Xcode 26 的最初版本中,苹果就已经加入了一定的 AI 辅助编程能力,但当时的体验更像是把 ChatGPT 生硬地嵌入到 IDE 中:功能存在,却彼此割裂。与当时风头正盛的 Cursor 相比,它更像是两个时代的产物。随着 Claude Code 等 AI CLI 工具逐渐成熟,Xcode 更显得步伐迟缓,甚至让不少开发者开始怀疑:在 AI 时代,它是否还能胜任“主力 IDE”的角色。
26.3 版本的到来,几乎没有任何预热,却用实际行动回应了这些质疑。通过集成 Claude Code / Codex,苹果给出的答案很直接:只要策略得当,Xcode 依然是苹果生态中极具潜力的开发环境。这一次,Xcode 并没有简单地塞进一个 CLI 工具面板,而是引入了一套原生的 Xcode Tools(MCP),并配合 Swift 6、SwiftUI、SwiftData 等官方技术文档,形成了高度一致、贴合最新实践的整体体验。即便对于已经熟练使用 CLI + XcodeBuildMCP + 各类 Skills 的开发者而言,这套原生方案依然具备很强的竞争力——尤其是几乎为零的配置成本,这对绝大多数开发者来说意义重大。
更值得注意的是,这次提供的 Xcode Tools 并不只是服务于 Xcode 本身,它们同样可以作为标准 MCP,为其他 AI 工具提供能力支持。这种开放姿态,并不完全符合外界对苹果一贯风格的印象。
当然,站在今天这个时间点,我们还不能断言 Xcode 已经重新回到了第一阵营。但可以肯定的是,26.3 释放了一个非常明确的信号:苹果愿意与主流工具和服务协作,去打造真正符合时代的开发体验。也正因为如此,我对下一阶段的 Siri 抱有更高的期待——很可能在 iOS 27 中,苹果会在现有 Intent 体系之外,为系统和应用提供更多标准化接口,让 AI 更自然地融入整个生态。
Xcode + Agent 只是起点。
Apple + Agent,才是更值得关注的未来。
如果您发现这份周报或我的博客对您有所帮助,可以考虑通过 爱发电,Buy Me a Coffee 支持我的创作。
原创
Xcode 26.3 + Claude Agent:模型替换、MCP、Skill 与自适应配置
Xcode 26.3 版本中苹果直接提供了对 Claude Code/Codex 的支持。自此,开发者终于可以在 Xcode 中方便的使用原生 AI Agent 了。 这两天我针对新版本进行了一系列尝试,包括如何使用最新模型、配置 MCPs/Skill/Command、以及编写自适应的 CLAUDE.md。本文以 Claude Code 为例,分享一些文档之外的技巧。
近期推荐
macOS 录屏软件开发实录:从像素抓取到元数据重现
视频正在取代文字成为更受欢迎的表达方式,而好工具是创作的加速器。macOS 录屏软件 ScreenSage Pro 的开发者 Sintone 深度复盘了如何基于 ScreenCaptureKit 和 Metal 实现“录完即剪完”。从解决 SCK -3821 诡异报错,到由 ObservableObject 迁移至 @Observable 优化时间线性能,本文毫无保留地分享了从像素抓取到高性能合成的全过程。
哪种方式判断字符串是否在白名单里最快:Set、Array、Enum、Dictionary 还是 switch?
在 Swift 里,判断一个字符串是否属于某个键集合,可以写成 Set.contains、Array.contains、RawRepresentable enum 的 init?(rawValue:)、switch 多分支,甚至用 Dictionary 来做映射。看起来差别不大,但真要放进性能敏感路径,结果可能并不完全符合直觉。Helge Heß 做了一次简单的基准测试:Set.contains 毫无悬念地领先,其次是 enum(rawValue:)和 Dictionary(两者非常接近);而很多人下意识会高估的 switch,反而排在 enum 之后,Array.contains 则垫底收场。作为一个小实验,这个结果或许正好可以拿来校准一下我们对 Swift 性能的直觉。
从一次性付费到 Freemium (Migrating an iOS app from Paid up Front to Freemium)
付费下载和免费 + 应用内购买是两种截然不同的商业模式,随着应用发展,开发者可能需要在两者之间转换。Donny Wals 在本文中分享了他将 Practical Core Data 应用从 $4.99 付费下载转为 freemium 的完整经历。文章不仅涵盖了 StoreKit 2 的技术实现细节(购买流程、状态管理、家庭共享),更有价值的是他对商业决策的深入思考:付费门槛虽然能筛选出认真的用户,但也阻挡了大量潜在用户体验产品价值的机会。对于教育类或工具类独立应用,freemium 可能是用户增长和收入之间更好的平衡点。
iOS 应用中的按需资源 (On-demand resources in iOS app)
应用体积一直是开发者需要关注的问题,尤其是在应用包含大量图片、音频或其他资源时。尽管苹果很早就在 iOS 中提供了 On-Demand Resources(ODR)来应对这一挑战,但这一功能的存在感并不强,常被开发者忽略。在本文中,Majid Jabrayilov 系统性地回顾了 ODR 的工作机制与使用方式,包括资源分组、标签管理、下载生命周期,以及与系统缓存策略之间的协作关系。
虽然苹果在推广 Background Assets 作为更现代的方案,但 ODR 在需要即时响应的按需下载、细粒度资源控制等场景下仍有其独特价值。
Observation 四个常见陷阱 (Objectively Better, Observably Trickier)
在全面拥抱 Observation 框架时,开发者需要警惕其工作机制与 Combine 的 @Published 并不相同,简单替换往往会引入隐蔽的问题。Danny Bolella 总结了迁移过程中四个常见陷阱:@State 持有引用类型时的非惰性初始化、嵌套 @Observable 对象导致的更新丢失、数组元素绑定方式的变化,以及与其他属性包装器产生的冲突。文章通过清晰的代码示例逐一给出解决方案,并反复强调一个核心原则:只有视图当前正在访问(调用 getter)的属性发生变化时,才会触发更新。理解并顺应这种“惰性观察”的思维方式,是正确使用 Observation 框架的关键。
在 macOS 应用中实现 Open Recent 菜单 (Add an Open Recent Menu to a SwiftUI app)
“Open Recent” 是 macOS 应用的标准功能,但对于 SwiftUI 开发者来说,正确实现这个功能并不直观。在本文中,Mark Szymczyk 通过一个简洁的示例,展示了如何利用 NSDocumentController 为应用接入系统级的最近文件管理能力:自动维护列表、更新菜单,以及与文档生命周期的无缝协作。对于文档型或工具类应用,这是一个低成本、却能明显提升“原生感”的细节优化。
工具
Radioform:一个原生、开源的 macOS 音频均衡器
macOS 一直缺少系统级的音频均衡器,由 Matthew Porteous 开发的 Radioform 填补了这个空白。该项目采用 SwiftUI 菜单栏 App + Swift Host + CoreAudio HAL Driver + C++ DSP 的分层架构,把 UI 与实时音频处理彻底解耦。DSP 部分实现了 10 段参数 EQ、参数平滑、限幅与实时安全控制;工程上也有完整 CI、签名公证与 DMG 发布流程。不是“能跑就行”的 Demo,而是接近可长期维护的生产级音频工程样板。
CircuitPro:macOS 原生的 PCB 设计工具
这是一个 macOS 原生应用较少涉足的领域:PCB 设计。CircuitPro 是一款面向 macOS 的 PCB EDA 工具,目标是把原理图、布局与元件库流程做成更符合 Apple 平台习惯的体验。(项目仍处于早期开发阶段)
项目里最吸引我的是自研的 CanvasKit。它更像一个面向 EDA 场景的 2D 交互引擎,而不只是普通画布组件:上层是声明式 CanvasView,中层是状态中枢 CanvasController,底层是输入路由、渲染树与工具系统。更关键的是,吸附、输入处理、连线引擎都被做成了协议化插拔点,让原理图和布局共享同一基础设施,同时保留各自的路由规则。
即便你对 PCB 设计本身不感兴趣,CircuitPro 也很值得关注,尤其是它在 SwiftUI + AppKit 融合架构上的工程实践。
求贤
了解二次元的 iOS 工程师
本公司是二次元文生图头部企业(总部新加坡),招聘岗位为大陆全职 remote。求职者需要了解二次元文化,懂得二次元用语(黑话)。
岗位职责 (Responsibilities):
我们正在寻找一位经验丰富的 iOS 工程师(中高级),负责主导我们 iOS 应用的开发与优化工作。
理想的候选人应具备深厚的 Swift 技术功底,出色的测试与团队协作能力,并拥有现代 iOS 架构及工具链的实战经验。
任职要求 (Requirements):
3 年以上 iOS 开发经验,主要使用 Swift,同时具备一定的 Objective-C 代码维护能力。
至少 1 年的 SwiftUI 和 SPM (Swift Package Manager) 实战经验,熟悉其生态系统及最佳实践。
熟悉 iOS 15+ 新特性,能够针对不同的 iOS 版本和设备屏幕尺寸进行适配及性能优化。
掌握单元测试和 UI 自动化测试 (XCTest, XCUITest),有能力编写可维护的代码,以确保项目的稳定性和可扩展性。
精通 Git 工作流(Git Flow, 主干开发/Trunk-Based Development),并具备基本的代码审查 (Code Review) 技能。
理解基础的 iOS 应用模块化设计、多种单页面架构模式以及性能优化方法,并具备在项目中落地的能力。
加分项/优先考虑 (We will give priority to who):
拥有跨平台开发经验(满足以下任意一项即可):
6 个月以上的任意前端技术栈经验 (TypeScript/JavaScript, React, React Native)。
6 个月以上使用 Kotlin 及相关框架的 Android 开发经验。
6 个月以上的任意后端开发框架经验。
拥有至少 6 个月的 iOS 基础设施工具或框架搭建经验,包括代码质量提升(Linting, 静态分析, CI/CD)、效率优化(模块化,Gradle 组件化*)、以及性能调优(启动速度、帧率、离线模式、多线程)。
拥有 1 年以上 SDK 开发经验,包括通用库开发,如图片加载库 (SDWebImage, Kingfisher)、富文本编辑器、网络层或持久化层 (SQLite, Realm, Core Data)。
具备 UI/UX 相关经验:
熟悉 Apple 人机交互指南 (HIG),能够在理解跨平台设计差异的同时,实现符合 Apple 设计标准的 UI。
拥有扎实的动画和交互动效开发经验,熟悉 Core Animation, UIKit Dynamics 等。
有深色模式 (Dark Mode) 及主题切换功能的开发经验。
具备极强的审美感知力,拥有绘画、摄影或设计相关的技能或爱好(附带作品集者优先)。
拥有完整的 App 生命周期经验:曾独立开发、发布并维护过支持多国/多语言的 iOS 应用。
积极参与技术社区,例如:
具有主动学习和分享的心态,有进行技术演讲的经验。
有技术写作经验(博客、文章)。
有开源项目贡献经历。
有使用 AI 编程工具的经验,如 Claude, ChatGPT, GitHub Copilot, Cursor 或 Windsurf。
具备流利的英语沟通能力或持有日语 N2 证书。

