Fatbobman's Swift Weekly #129
A Wall Away, Worlds Apart
A Wall Away, Worlds Apart
The annual Let’s Vision conference was held in Shanghai as scheduled, with this year’s theme being: “Born to Create, Powered by AI.” Therefore, alongside the regular sessions on Swift and spatial computing, the conference invited many developers to share their applications and insights regarding AI in their daily workflows. I benefited immensely from the speakers’ introductions to their AI workflows. The AI-themed venue, originally designed to hold only 300 people, was packed inside and out with an enthusiastic crowd.
However, among the many excellent sessions, a talk prepared by YuChe Cheng titled “Let’s Create 1-liner Code in Swift” drew my attention to another room. What exactly was this topic about? Driven by curiosity, I walked in. As a developer with a LeetCode rating of 2200+, YuChe Cheng demonstrated how to use the extensive higher-order functions provided by Foundation and Swift Algorithms to transform plain, ordinary for-loop code into elegant, beautiful, and highly Swift-styled function chaining (1-liner code). In doing so, he achieved a brilliant balance between readability and performance.
Watching the function chaining on the slides being elegantly iterated over and over again, I felt a refreshing sense of clarity and enlightenment. For the entire 30-minute talk, I remained in a state of pure excitement—a feeling that typically only emerges after I’ve racked my brain to finally conquer a difficult problem, or when I’ve deeply grasped a new concept.
Even though it was only a wall away from the main venue, the overwhelming popularity of the AI topic meant the audience for this talk was noticeably sparse. Rather than feeling regret that so many missed out on a fantastic presentation, my real concern is this: As AI penetrates further into our industry, will that distinctive “character” developers once pursued and imbued into their code—beyond mere functionality—fade into oblivion?
Developers shouldn’t only care about cold, compiled binaries. Code itself is a vessel for personal style. Just like writing an essay, beyond delivering logic and results, it carries aesthetic expression, reflecting the author’s personal taste and ingenuity.
At this year’s Let’s Vision, I felt as though we were standing at a crossroads: Should we relentlessly pursue the extreme efficiency brought by AI, or, while embracing change, can we ensure that the pride and craftsmanship belonging to developers are still preserved in the AI era?
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 ☕️
Recent Recommendations
Swift 6.3 Released
Since Swift 6, the language has settled into a steady cadence of one minor release every six months. Swift 6.3 was released as expected last week. Compared to previous releases, this version does not introduce any major headline features, but instead focuses on refining the existing system: improvements in concurrency diagnostics, the introduction of the @c attribute to further strengthen C/C++ interoperability, and more granular control over compiler optimizations.
That said, this release still sends a clear signal: Swift is evolving from a language centered around Apple platforms into a more general-purpose language with cross-platform and system-level capabilities. The continued progress of Embedded Swift, Android support, and the unification of the SwiftPM build system all point in this direction. For most iOS developers, the short-term impact may feel limited, but in the long run, this is a foundational update paving the way for what comes next.
Designing a type-driven JSON in Swift
When API contracts are unstable and the understanding of fields between frontend and backend frequently drifts, Swift’s strong type system can actually amplify the friction at the JSON boundary. Roman Niekipielov introduces a deliberately minimal JSONValue type to handle such transitional data.
Compared to [String: Any], it preserves clearer type structure; compared to fully defined Codable models, it better accommodates frequently changing contracts. This approach does not aim to replace formal models, but rather to contain uncertainty at the boundary layer.
Swift Native AI Agent Development Series
While many developers build AI agents using Python or TypeScript, Chris Karani argues that Swift’s concurrency model is naturally well-suited for agent isolation and scheduling, with its strong type system and macro capabilities adding extra safety guarantees.
Across six articles, he explores this idea from multiple angles—from a unified multi-provider LLM SDK Conduit, to an agent runtime built on Apple Foundation Models Colony, and even Metal-accelerated context memory management. If you are considering building AI features on Apple platforms, this is one of the few comprehensive native approaches available today.
Talking Liquid Glass with Apple
Danny Bolella attended Apple’s Liquid Glass design workshop in New York, spending three days in close collaboration with design teams and SwiftUI engineers. The message from the event was clear: Liquid Glass is not a transitional experiment, but a long-term design direction that will become the default across future toolchains.
Apple also repeatedly emphasized the importance of hierarchy—interfaces should be built around content, with controls serving as supporting elements positioned toward the edges. Beyond that, Danny also shares practical advice and implementation insights from Apple engineers. The article offers an early look into the direction and philosophy behind this design evolution.
Apple Dropped 100+ New Metrics. Your Competitors Are Already Using Them
Apple has rolled out one of the most significant updates to App Store Connect in recent years, introducing 100+ first-party metrics, cohort analysis by source, peer benchmarks (conversion rate and revenue per download), and subscription data export via API. Jessica Chung provides a structured overview of these changes.
Since all data now comes directly from Apple, developers can move away from third-party estimates and make decisions based on real user behavior. More importantly, this update fills a long-standing gap: you can now track user quality across channels and keywords, build a full funnel from impression to subscription and retention, and benchmark your performance against peers.
This update is clearly beneficial for developers, but it also raises the bar for third-party App Store analytics tools, pushing them to deliver higher-value capabilities to remain competitive.
Package Traits in Xcode
When building an SPM package, some dependencies may only be used by specific APIs. However, once the package is added, those dependencies are included regardless of whether those APIs are used. Package Traits were introduced to address this issue by allowing developers to define optional features that consumers can enable as needed, avoiding unnecessary dependencies.
Unfortunately, after its introduction, this feature was only available in community Swift toolchains. With the release of Xcode 26.4, Package Traits finally gained official support from Apple, making broader adoption more likely. Matt Massicotte introduces the feature and demonstrates its usage in this article.
Why your SwiftUI app feels slow even though Instruments says it’s fine?
When users complain about slow responsiveness, is it always a performance issue? Rafał Dubiel shifts the focus from actual performance to perceived performance, exploring how UI feedback and interaction timing can make apps feel faster.
Techniques such as skeleton views, delayed loading, and thoughtful animations can effectively mask waiting time. The key insight is that user experience is often less about reducing milliseconds and more about providing timely feedback. Compared to raw performance optimization, this perspective has a more direct impact on how users perceive fluidity.
Adjusting line height in SwiftUI on iOS 26
iOS 26 introduces a new lineHeight(_:) modifier in SwiftUI for controlling the baseline distance between lines of text. Natalia Panferova provides a detailed comparison of its configurations, including presets (.loose, .tight), proportional scaling (.multiple(factor:)), incremental adjustments (.leading(increase:)), and absolute control (.exact(points:)).
Unlike lineSpacing(_:), which adjusts spacing between lines, lineHeight(_:) directly defines baseline distance, offering more consistent control. This addition further improves SwiftUI’s typography capabilities.
Natalia Panferova, a former member of Apple’s SwiftUI core team, has recently published a new book The SwiftUI Way, aimed at experienced SwiftUI developers. The book focuses on production patterns, common anti-patterns, and how to work with the framework rather than against it.
Tools
Cove: A Swift 6 Native macOS Open Source Database Client
Cove, developed by Emanuele Micheletti, is a native macOS database client built entirely with Swift 6. It currently supports a wide range of backends including PostgreSQL, MySQL, MariaDB, SQLite, MongoDB, Redis, ScyllaDB, Cassandra, and Elasticsearch. Built with SwiftUI and AppKit instead of Electron or web technologies, it delivers a lightweight experience aligned with macOS conventions.
What makes Cove particularly interesting is its architecture. All database capabilities are abstracted through a unified DatabaseBackend protocol, with no backend-specific logic in the UI layer. Whether dealing with SQL databases, key-value stores like Redis, or NoSQL systems like MongoDB and Elasticsearch, everything is normalized into a table model for rendering. Although still in an early v0.1.0 stage, it already supports querying, schema browsing, editing, SSH tunneling, and multi-tab workflows. Even if you don’t plan to use it as your daily database tool, it’s a valuable reference for Swift-based desktop app architecture.
Thanks for reading Fatbobman’s Swift Weekly! This post is public so feel free to share it.
一墙之隔,不同的时空
一年一度的 Let’s Vision 大会在上海如期举行,今年的主题是:“Born to Create, Powered by AI”。除了与 Swift、空间计算相关的常规 Session,大会还邀请了许多开发者分享他们在工作中对 AI 的应用与理解。通过这些讲师对 AI 工作流的介绍,我也受益匪浅。原本只能容纳 300 人的 AI 主题会场,里三层外三层站满了热情高涨的观众。
然而,在众多优秀的 Session 中,一场由 YuChe Cheng 准备的、名为《Let’s Create 1-liner Code in Swift》的演讲却将我的注意力引向了另一个会场。这究竟是一个怎样的话题?带着疑问我走了进去。作为一个 LeetCode 积分 2200+ 的开发者,YuChe Cheng 在演讲中展示了如何通过 Foundation 以及 Swift Algorithms 提供的大量高阶函数,将原本平淡无奇的 For-loop 代码,转换成更加优雅、美观、极具 Swift 风格的 Function Chaining(1-liner code),并在易读性与性能之间取得了很好的平衡。
看着幻灯片上的 Function Chaining 被一次又一次地优雅迭代,我有种茅塞顿开的畅快。整整 30 分钟的演讲,让我始终处于一种纯粹的兴奋之中——这种感觉,通常只在我绞尽脑汁最终攻克了一个难题,或是深刻理解了一个新概念后才会涌现。
尽管与主会场只有一墙之隔,但由于 AI 话题的绝对热度,本场演讲的听众明显偏少。与其说我为许多人错失了一场精彩演讲而感到遗憾,我真正担心的其实是:随着 AI 的进一步渗透,许多开发者原本在追求功能之外所赋予代码的那份“气质”,会不会就此消亡?
开发者不应该只关心编译后冷冰冰的二进制功能,代码本身也是个人风格的载体。它就像文章一样,在输出逻辑与结果之外,还承载着美学表达,体现着编写者的个人品味与巧思。
在今年的 Let’s Vision 上,我感觉我们正站在一个时间的十字路口:我们是该一味追求 AI 带来的极致高效,还是在拥抱变化的同时,依然让属于开发者的那份骄傲与手艺,在 AI 时代得以保留?
如果您发现这份周报或我的博客对您有所帮助,可以考虑通过 爱发电,Buy Me a Coffee 支持我的创作。
本期推荐
Swift 6.3 Released
从 Swift 6 开始,语言演进已经稳定在半年一个 minor 版本的节奏,上周 Swift 6.3 如期发布。与前几个版本相比,这一版本并未引入明显的重磅特性,更多是对既有体系的打磨:并发模型在诊断准确性方面有所改进,新增的 @c 特性(attribute)进一步强化了 C/C++ 互操作能力,同时编译优化的控制粒度也变得更加细致。
尽管如此,这一版本也释放出一个清晰的信号:Swift 正在从“以 Apple 平台为中心的应用开发语言”,逐步向“具备跨平台与系统级能力的通用语言”演进。Embedded Swift、Android 支持的持续推进,以及 SwiftPM 构建体系的统一,都在指向这一方向。对多数 iOS 开发者而言,短期体感或许有限,但从更长的时间维度来看,这更像是一次为未来铺路的基础性更新。
如何在 Swift 中承接尚未稳定的 JSON (Designing a type-driven JSON in Swift)
当 API 契约尚未稳定、前后端对字段的理解又经常漂移时,Swift 的强类型系统反而会放大数据与 JSON 之间转换时的边界问题。Roman Niekipielov 在本文中介绍了一个刻意做小的 JSONValue 类型,用来承接这类过渡阶段的 JSON 数据。相比 [String: Any],它保留了更明确的类型结构;相比直接编写 Codable 模型,又更适合应对频繁变化的契约。这个实现并不试图替代正式模型,而是将不确定性暂时限制在边界层。
Swift 原生 AI Agent 开发实践系列
市面上有大量开发者使用 Python、TypeScript 开发 AI Agent,但 Chris Karani 认为,Swift 的并发模型天然更适合 Agent 的隔离与调度,强类型系统和宏功能也带来了额外的安全保证。他用 6 篇文章、从多个角度实践了这一观点——从统一多个 LLM Provider 的 SDK Conduit,到基于 Apple Foundation Models 的 Agent 运行时 Colony,再到用 Metal 加速的上下文记忆管理。如果你正在考虑在 Apple 平台上构建 AI 功能,这个系列是目前少见的完整原生方案。
Liquid Glass 设计工作坊 (Talking Liquid Glass with Apple)
Danny Bolella 在纽约参加了苹果举办的 Liquid Glass 设计工作坊,与设计团队和 SwiftUI 工程师进行了为期三天的深入交流。本次活动传递出非常明确的信号:Liquid Glass 并非过渡性尝试,而是苹果未来数年的设计方向,且将在后续工具链中成为默认前提。与此同时,苹果反复强调“层级(Hierarchy)”的重要性——界面应围绕内容构建,控件只是服务于内容的辅助元素,应尽量退居边缘,让信息本身成为视觉与交互的中心。除此之外,Danny 还在本文中记录了其他一些 SwiftUI 工程师给出的建议和技巧。本文记录的内容可以帮助你更早理解这场设计演进的节奏与方向。
App Store Connect 大更新 (Apple Dropped 100+ New Metrics. Your Competitors Are Already Using Them)
苹果对 App Store Connect 进行了近年来最大的一次更新,一口气引入了 100+ 官方指标、按来源划分的 cohort 分析、同行基准对比(转化率与单下载收益)以及可通过 API 导出的订阅数据。Jessica Chung 在本文中对这些关键变化进行了系统梳理。由于所有数据均来自苹果一手统计,这意味着开发者在 ASO 和增长决策中,将不再依赖第三方估算,而可以直接基于真实用户行为进行分析与优化。更重要的是,这次更新补齐了长期缺失的关键能力:你可以追踪不同关键词与渠道带来的用户质量,建立从曝光、下载到订阅与续费的完整转化链路,并通过同行基准明确自身所处位置。
本次更新对于开发者而言无疑是利好,但对于部分第三方 App Store 分析服务来说,也在一定程度上提高了竞争门槛,促使其提供更具附加值的能力。
Package Traits in Xcode
在创建 SPM 时,某些依赖可能只被特定 API 使用,但一旦用户引入该包,即便不使用这些 API,也需要一并引入相关依赖。Package Traits 正是为了解决这一问题而引入的,它为 SPM 提供了一种声明可选特性的方式,使使用者能够按需启用功能,从而避免引入不必要的依赖。遗憾的是,在该功能推出后,一直只能在社区版本的 Swift 工具链中使用。随着 Xcode 26.4 的发布,Package Traits 终于获得了苹果官方支持,有望迎来更广泛的应用。Matt Massicotte 在本文中对该特性进行了介绍,并展示了其基本用法。
优化感官性能,让用户感觉更快 (Why your SwiftUI app feels slow even though Instruments says it’s fine?)
用户投诉响应慢,一定是应用性能问题吗?Rafał Dubiel 将关注点从“实际性能”转向“感知性能(Perceived Performance)”,讨论如何通过界面反馈与交互节奏,让用户感觉应用“更快”。例如通过 skeleton view、延迟加载,以及合理的动画与状态过渡来掩盖等待时间。作者指出,在许多场景下,用户体验的关键并不在于减少毫秒级的计算时间,而在于是否及时提供反馈。相比单纯优化性能指标,这种从用户感知出发的思路,往往更直接地影响用户对应用流畅度的判断。
在 SwiftUI 中控制行高 (Adjusting line height in SwiftUI on iOS 26)
iOS 26 为 SwiftUI 新增了 lineHeight(_:) modifier,用于控制文本相邻两行基线之间的距离。Natalia Panferova 在本文中对各种配置方式进行了详细对比:内置预设(.loose、.tight)、基于字号倍数的 .multiple(factor:)、固定增量的 .leading(increase:),以及绝对值控制的 .exact(points:)。此外,lineHeight(_:) 与已有的 lineSpacing(_:) 并不相同:前者控制基线间距,后者控制行底到下一行行顶的距离。
Natalia Panferova 曾是 Apple SwiftUI 核心团队成员,参与过多个关键 API 的设计与开发。本月她刚刚出版了新书 The SwiftUI Way,面向有一定 SwiftUI 经验的开发者,聚焦于生产环境中的模式选择、常见反模式识别,以及如何与框架“顺势而为”而非对抗。
工具
Cove:Swift 6 编写的 macOS 开源数据库客户端
Cove 是由 Emanuele Micheletti 开发的一款原生 macOS 数据库客户端,整个项目完全使用 Swift 6 构建,目前已经支持 PostgreSQL、MySQL、MariaDB、SQLite、MongoDB、Redis、ScyllaDB、Cassandra 和 Elasticsearch 等多种后端。它采用 SwiftUI 搭配 AppKit 原生控件实现,没有走 Electron 或 Web 技术栈,因此整体更轻量,也更符合 macOS 用户熟悉的交互体验。
相比“又一个数据库 GUI”,Cove 更值得关注的是它的实现思路。作者将所有数据库能力统一抽象为 DatabaseBackend 协议,UI 层不包含任何针对特定后端的分支逻辑。无论是 SQL 数据库、Redis 这类键值数据库,还是 MongoDB、Elasticsearch 这类非关系型后端,最终都会被整理为统一的表格模型交由界面渲染。项目目前仍处于 v0.1.0 的早期阶段,但已经具备查询、结构浏览、编辑、SSH 隧道和多标签等基础能力。即便你并不打算把它作为日常数据库工具,Cove 依然是一个很值得 Swift 开发者研究的桌面应用架构样本。


