Swift Server Has Another Google
Last week, Google Cloud introduced a Swift SDK for server-side development. It covers more than a hundred Google Cloud services, including Cloud Storage, IAM, Secret Manager, and AI, while providing essential cloud capabilities such as authentication, retries, and pagination. Google is very clear about its positioning: this is a Swift SDK built for servers, containers, and DevOps, not a client-side tool for iOS apps to access cloud services directly.
Unlike the mobile Firebase SDK, which largely provides modern Swift APIs on top of an existing foundation, this server-side SDK was designed from the outset for modern Swift and server-side use cases. When used with Vapor or Hummingbird, it allows developers to access core GCP resources and AI services such as Gemini in a more native way that fits naturally with Swift’s concurrency model.
The announcement has been met with both excitement and caution from the community. But I don’t think there’s any need to celebrate it as “Google finally recognizing Swift.” The involvement of a large company has never been a guarantee of long-term commitment. A decade ago, IBM invested heavily in server-side Swift and led the development of Kitura, only to gradually step away. Google’s own heavily backed Swift for TensorFlow project has also long since ceased development. These precedents remind us that the arrival of another tech giant is hardly a reason to declare the beginning of some new era for Swift Server.
Google is now willing to bring Swift into its official Cloud API Client Libraries ecosystem and take on the long-term, unglamorous work of API updates, code generation, authentication, compatibility, and more. Rather than seeing this as a new beginning for Swift Server, I think it makes more sense to view it as a natural outcome of years of development.
Swift today is also very different from what it was a decade ago. It has accumulated years of development across server-side use cases, Linux, networking, and other areas, while more recently continuing to expand toward platforms such as Windows and Android. Its cross-platform capabilities no longer depend on the efforts of any single company, nor are they merely experiments taking place outside Apple’s ecosystem.
Perhaps what is truly worth celebrating is precisely that Google Cloud supporting Swift no longer feels all that surprising. Once a language and its ecosystem reach a certain level of maturity, official support from a major cloud provider should simply be a normal part of its development.
In any case, welcome aboard, Google.
Previous Issue|Newsletter Archive
This Week’s Sponsor
Transcribatron —— on-device meeting notes for developers
$8.99 once. No subscription, no account, no backend. Transcribatron transcribes on-device, syncs two-way with your Obsidian vault, and ships an MCP server so Claude Code can query your meetings. Use your own API key or a local model.
Original
Letting AI See SwiftUI: Xcode Preview MCP in Practice — Pitfalls and Hopes
Xcode 26.3 marked the first time Apple opened its own capabilities to external agents through MCP. Many of those capabilities were already reachable through the CLI, but Preview rendering was entirely new. Xcode 27 went a step further with a headless MCP server, making these tools even easier to call, so I wove Preview rendering deeply into my AI workflows. Along the way I ran into a few pitfalls, and came away with some reflections and hopes.
Recent Recommendations
Using Swift’s ‘some’ keyword beyond SwiftUI
The widespread use of some View has led many developers to overlook the potential of some in other contexts. John Sundell brings it back into the context of Swift generics and API design, demonstrating its uses and advantages in both parameter and return positions. For example, in a parameter position, func saveToWatchLater<T: Sequence>(_ videos: T) can be simplified to func saveToWatchLater(_ videos: some Sequence<Video>).
Beyond that, some can provide a statically determined return type without exposing the concrete implementation type, making it possible in some cases to avoid introducing AnyXXX-style type erasure simply to hide implementation details.
Iterative data loading in Swift
When a screen needs to make dozens of asynchronous requests, striking a balance between loading data and providing timely UI feedback is not easy. Majid Jabrayilov uses AsyncSequence to divide data loading into multiple stages, returning the accumulated results after each step so that the UI can update progressively as data arrives. Within each stage, related requests can still be performed concurrently using async let. For data-heavy screens, iterating between stages while running tasks concurrently within each stage can be an effective approach.
Modifier Order Is Matrix Order
SwiftUI developers know that the order of Modifiers affects the final result, but this understanding often remains rooted in practical experience rather than rigorous theory and logical verification. Mihaela Mihaljević Jakić reexamines the execution order of Modifiers such as offset, rotationEffect, and scaleEffect from the perspective of matrix transformations. By comparing actual rendering results from ImageRenderer with calculations using CGAffineTransform, she turns this rule of thumb into a principle that can be understood and derived through matrix operations.
Rules can evolve into algorithms, and algorithms can reduce the cost of generation and verification. Mihaela’s article does more than explain “how it should be written”; it also verifies “whether SwiftUI actually works this way.” The results may have applications that extend even further.
How to reduce token usage in Claude Code, Codex, and Cursor
Compared with writing code, analyzing logs and locating errors are areas where AI Agents can demonstrate their strengths even more clearly. But complete command output consumes more tokens and takes up valuable context space. Antoine van der Lee introduces a simple but effective optimization: instead of exposing an Agent directly to complete, unprocessed command output, filter and compress it with scripts or tools before it enters the context, retaining only the information that is genuinely useful for making the next decision.
Daniel Saidi shares a similar practice, significantly reducing Claude Code’s token usage by optimizing Xcode Build output. As Agents work for longer periods and take on larger tasks, reducing this redundant information that is “generated by machines and consumed by machines” may gradually become an area worth optimizing in its own right within Agent workflows.
Automating accessibility audits for SwiftUI apps with XCTest
When these accessibility testing APIs were designed, the team behind them probably did not anticipate that they would find an even broader range of applications in the AI Agent era. Natascha Fadeeva demonstrates how to use performAccessibilityAudit in UI Tests to automatically check common accessibility issues such as contrast, element descriptions, Hit Region, and Dynamic Type, while limiting audit types and filtering known issues to incorporate these checks into an ongoing automated testing workflow.
Rather than asking a model to determine on its own whether an interface meets accessibility requirements, a clear and repeatable verification mechanism provided by the system allows an Agent to proactively run checks after modifying the UI and continue adjusting the code based on the results.
Some Thoughts on Development - Code Review
As the amount of code an Agent can generate in a single pass continues to grow, whether to review it and how to review it have become questions every developer has to confront. Wei Wang argues that in the AI era, Code Review should move away from code as the intermediate artifact and toward both ends of the process: upward into requirements and specs, ensuring that the goals, boundaries, and acceptance criteria understood by the Agent align with the human’s actual intent; and downward into the final product, using evidence such as tests, screenshots, and screen recordings to confirm that the implementation truly meets the requirements. The code in between, meanwhile, can increasingly be left to Agents to review one another. The article also demonstrates the Review Loop that the author uses in Prowl, where different Agents cycle through implementation, review, fixes, and re-review until the exit conditions are met.
WWDC 2027 Wishlist
You read that right. Harshil Shah has written down his hopes for next year’s WWDC 2027 more than half a year in advance. His wishlist covers SwiftUI, cross-device syncing, photo permissions, Liquid Glass, Camera, TestFlight, Xcode, Apple Watch, and more. His questions about the long-term relationship between SwiftUI and UIKit are particularly thought-provoking: now that AI Agents have dramatically reduced the cost of writing code, is SwiftUI’s concise syntax still as important an advantage as it once was? And with Apple continuing to introduce new capabilities for both UI frameworks, is their long-term coexistence and interweaving simply the future?
Tools
Argent: Let AI Coding Assistants Participate in App Runtime and Verification
Argent is an open-source tool from Software Mansion that brings simulator interaction, runtime inspection, and native performance profiling together in a single toolset. It also supports recording and replaying interaction flows, allowing AI assistants to follow the same path when comparing behavior before and after a change.
In addition to performing taps, swipes, text input, and screenshots, reading the interface hierarchy, reproducing issues, and verifying changes, Argent integrates native performance profiling based on Xcode Instruments. It provides information about CPU hotspots, UI stalls, memory leaks, and more, giving code improvements actual runtime data to work from.
Argent uses mixed licensing: the source code is licensed under Apache 2.0, while some native binary components use a proprietary license.
App Store Screenshots Generator
App Store Screenshots, developed by Parth Jadhav, is a Skill designed for AI Agents that can generate an editable store screenshot editor from app information and raw screenshots, then export all the sizes required by the App Store and Google Play.
It provides 18 preset visual styles, supports continuous canvases spanning multiple screenshots, device frames, multiple languages, and RTL, and covers devices including iPhone, iPad, Mac, Apple Watch, Apple TV, CarPlay, and Android. Rather than producing one-off static images, it generates an interactive Next.js-based editor, allowing developers to continue adjusting copy, layouts, and assets, while saving the project state for further revisions.
Survey
Survey on AI Coding Tool Usage Among Apple Developers
SwiftGG is conducting a survey on AI coding tool usage among developers in the Apple ecosystem, aiming to understand developers’ real-world usage habits, how these tools are changing their workflows, and what they expect from future development experiences. The results will be compiled into a report and shared publicly with the developer community.
If you’re using Xcode along with various AI Coding tools, consider spending around 15 minutes sharing your real-world experience. Broader participation will help the final data more accurately reflect how Apple developers actually work in the AI era.
Thanks for reading Fatbobman’s Swift Weekly! This post is public so feel free to share it.
Swift Server,又多了一个 Google
上周,Google Cloud 推出了面向服务端的 Swift SDK。它覆盖 Cloud Storage、IAM、Secret Manager、AI 等一百多个 Google Cloud 服务,并提供认证、重试、分页等完整的云端基础能力。Google 对它的定位非常明确:这是为 Server、Container 和 DevOps 准备的 Swift SDK,而不是给 iOS 应用直接访问云服务使用的客户端工具。
与移动端 Firebase SDK 更多是在既有基础上提供现代 Swift API 不同,这款服务端 SDK 从一开始就面向现代 Swift 和服务端场景设计,让开发者在配合 Vapor 或 Hummingbird 时,能够以更加原生、符合 Swift Concurrency 模型的方式调用 GCP 核心资源与 Gemini 等 AI 服务。
面对这一消息,社区既有期待,亦不乏审慎。但我觉得大可不必用「Google 终于认可 Swift」这样的方式来庆祝。大公司的加入从来不等于长期承诺。十年前 IBM 也曾积极投入 Server-side Swift,并主导开发 Kitura,最终却逐渐退出;Google 自己曾经大力投入的 Swift for TensorFlow 也早已停止发展。这些前车之鉴提醒我们,不必因为一家大型科技公司的加入,就急着宣布 Swift Server 进入了某个新时代。
Google 现在愿意把 Swift 纳入官方 Cloud API Client Libraries 体系,承担 API 更新、代码生成、认证、兼容性等长期而琐碎的维护工作,与其说这是 Swift Server 的新起点,不如说是多年发展的一个自然结果。
今天的 Swift 与十年前也已经不同。Swift 在 Server、Linux、Networking 等方向积累多年,近年来又持续向 Windows、Android 等平台扩展。它的跨平台能力不再依赖某一家公司的推动,也不再只是 Apple 生态之外的实验。
或许真正值得高兴的,恰恰是 Google Cloud 支持 Swift 这件事已经不再那么令人意外。当一门语言和它的生态发展到一定阶段,大型云服务商为它提供官方支持,本来就应该是一件普通的事情。
无论如何,欢迎 Google 加入。
本期赞助
Transcribatron —— 为开发者打造的端侧会议笔记
Transcribatron 在设备端完成转写,与你的 Obsidian 仓库双向同步,并内置 MCP 服务器,让 Claude Code/Codex 能够查询会议内容。可使用自有 API 密钥或本地模型。一次买断仅需 8.99 美元,无订阅、无账户、无后端服务。
原创
让 AI 看见 SwiftUI:Xcode Preview MCP 的实践、陷阱与期待
Xcode 26.3 是苹果第一次通过 MCP 把自身能力开放给外部 Agent。其中不少能力此前借助 CLI 也能获得,但 Preview 渲染是头一回出现。到了 Xcode 27,苹果又提供了 headless MCP server,调用起来更加顺手,于是我把 Preview 渲染大量嵌进了自己的 AI 工作流。一路用下来,踩了一些坑,也多了一些感悟和期待。
近期推荐
走出 SwiftUI 的 some 关键字 (Using Swift’s ‘some’ keyword beyond SwiftUI)
由于 some View 的使用太过普遍,以至于很多开发者都忽略了 some 在其他场景中的应用潜力。John Sundell 将它放回 Swift 泛型与 API 设计的语境,展示了 some 在参数与返回值中的用途与优势。例如,在参数位置,可以从 func saveToWatchLater<T: Sequence>(_ videos: T) 简化为 func saveToWatchLater(_ videos: some Sequence<Video>)。
除此之外,some 还可以在不暴露具体实现类型的情况下提供静态确定的返回类型,从而在一些场景中避免为了隐藏实现细节而引入 AnyXXX 式的类型擦除。
Swift 迭代式数据加载 (Iterative data loading in Swift)
当一个页面需要发起几十个异步请求时,如何在数据加载与及时的 UI 反馈之间取得平衡并不容易。Majid Jabrayilov 使用 AsyncSequence 将数据加载拆分成多个阶段,每完成一步便返回当前累积的结果,让 UI 可以随着数据到达逐步更新;而在每个阶段内部,仍然可以使用 async let 并发完成相关请求。对于数据密集型页面,阶段之间迭代、阶段内部并发不失为一种有效的思路。
SwiftUI Modifier 顺序背后的矩阵规律 (Modifier Order Is Matrix Order)
SwiftUI 开发者都知道 Modifier 的顺序会影响最终结果,但这种认知更多停留在实践层面,而缺乏严谨的理论和逻辑验证。Mihaela Mihaljević Jakić 从矩阵变换的角度重新解释了 offset、rotationEffect 和 scaleEffect 等 Modifier 的执行顺序,并通过 ImageRenderer 的实际渲染结果与 CGAffineTransform 的计算进行验证,将这条经验法则变成了一套可以通过矩阵运算理解和推导的规则。
规则可以演化成算法,算法可以降低生成和验证的成本。Mihaela 的这篇文章不只是解释「应该怎么写」,还在验证「SwiftUI 实际上是不是这么做的」,而这样的成果或许还有更大的应用空间。
优化 AI 编程助手的 Token 消耗 (How to reduce token usage in Claude Code, Codex, and Cursor)
相较于写代码,AI Agent 分析日志、定位错误的能力更能凸显其优势。但完整的输出会消耗更多 token,还会挤占宝贵的上下文空间。Antoine van der Lee 介绍了一个简单但有效的优化思路:不要让 Agent 直接面对未经处理的完整命令输出,而是在进入上下文之前,通过脚本或工具对其进行过滤和压缩,只保留真正有助于下一步判断的信息。
Daniel Saidi 也分享了类似的实践,通过优化 Xcode Build 的输出大幅减少 Claude Code 的 token 使用。随着 Agent 工作时间和任务规模不断增长,减少这些「机器产生、机器消费」的冗余信息,或许会逐渐成为 Agent 工作流中一个值得专门优化的环节。
用 XCTest 自动化无障碍检查 (Automating accessibility audits for SwiftUI apps with XCTest)
在设计这些辅助功能测试 API 时,设计团队恐怕没有想到,它们会在 AI Agent 时代获得更广阔的应用空间。Natascha Fadeeva 介绍了如何使用 performAccessibilityAudit 在 UI Test 中自动检查对比度、元素描述、Hit Region、Dynamic Type 等常见的 accessibility 问题,并通过限定检查类型和过滤已知问题,将这些检查纳入持续的自动化测试流程。
相比让模型自行判断界面是否符合 accessibility 要求,由系统提供明确、可重复执行的验证机制,可以让 Agent 在修改 UI 后主动运行检查,并根据结果继续调整代码。
一些关于开发的杂谈话题 - 代码审核
随着 Agent 单次生成的代码量越来越大,是否审查、如何审查,已经成为摆在每个开发者面前的问题。王巍 认为,AI 时代的 Code Review 应该从代码这个中间产物向两端移动:向上进入需求和 spec,确保 Agent 理解的目标、边界和验收标准与人的真实意图一致;向下进入最终产物,通过测试、截图、录屏等证据确认实现是否真正满足要求。至于中间的代码,则可以更多交给 Agent 相互审核。文章还展示了作者在 Prowl 中实践的 Review Loop:由不同 Agent 在实现、审核、修复和再次审核之间循环,直到满足退出条件。
WWDC 2027 Wishlist
你没有看错,Harshil Shah 提前大半年写下了对明年 WWDC 2027 的期许。他的清单涵盖 SwiftUI、跨设备同步、照片权限、Liquid Glass、Camera、TestFlight、Xcode 和 Apple Watch 等多个方面。其中关于 SwiftUI 与 UIKit 长期关系的疑问尤其值得开发者思考:在 AI Agent 大幅降低代码编写成本之后,SwiftUI 简洁语法的优势是否还像过去那样重要?当 Apple 仍在同时为两个 UI 框架提供新能力时,两者长期交织共存是否就是未来的答案?
工具
Argent:让 AI 编程助手参与应用的运行与验证
Argent 是 Software Mansion 推出的开源工具,将模拟器交互、运行时检查与原生性能分析整合在同一套工具中,并支持录制、回放操作流程,让 AI 助手能够沿着相同路径检查修改前后的表现。
除了执行点击、滑动、输入和截图,读取界面结构,帮助复现问题和验证修改结果外,Argent 还集成了基于 Xcode Instruments 的原生性能分析能力,提供 CPU 热点、界面卡顿与内存泄漏等信息,让代码改进有实际运行数据作为依据。
Argent 使用混合许可:源码采用 Apache 2.0,部分原生二进制组件采用专有授权。
App Store Screenshots Generator
Parth Jadhav 开发的 App Store Screenshots 是一个面向 AI Agent 的 Skill,可以根据应用信息和原始截图生成一套可继续调整的商店截图编辑器,并统一导出 App Store 和 Google Play 所需的各种尺寸。
它提供 18 种预设视觉风格,支持跨越多张截图的连续画布、设备边框、多语言和 RTL,并覆盖 iPhone、iPad、Mac、Apple Watch、Apple TV、CarPlay 以及 Android 等设备。生成结果并非一次性的静态图片,而是一个基于 Next.js 的可交互编辑器,开发者仍可以继续调整文案、布局和素材,并将项目状态保存下来反复修改。
调研
Apple 开发者 AI 编程工具使用情况调查
SwiftGG 正在开展一项面向 Apple 生态开发者的 AI 编程工具使用情况调查,希望了解开发者目前使用 AI Coding 工具的真实习惯、由此带来的工作流变化,以及对未来开发体验的期待。最终结果将整理成报告并向开发者社区公开。
如果你正在使用 Xcode 以及各种 AI Coding 工具,不妨花大约十几分钟分享一下自己的实际体验。更广泛的参与,也能让最终的数据更准确地反映 AI 时代 Apple 开发者真实的工作方式。


