Fatbobman's Swift Weekly #127
Apple at 50 and Me at 51In less than half a month, Apple will celebrate its 50th birthday. Tim Cook has also published a short piece paying tribute to the journey of the past half-century. However, because of Apple’s image as a constant trendsetter, many people don’t realize that it is now a veritable elder statesman in the IT industry. Among the tech giants of its age, very few remain at the top-tier table today. As a tech enthusiast who is only one year older than Apple, from the Apple II to today’s iPhone and MacBook, Apple’s products have accompanied me through most of my life. Strictly speaking, I wouldn’t call myself a hardcore Apple fan—I don’t feel regret if I don’t buy a new product on day one, I rarely stay up late to watch keynotes anymore, and I’m even less familiar with the exact specs of their newest devices. But looking back, at every major milestone in my life, I have naturally chosen Apple products, and in recent years, I have become a part of the Apple developer ecosystem. To be honest, I haven’t entirely figured out where Apple’s enduring appeal to me comes from. Is it because I started using its products so early on? Is it its innovation, user experience, and overall vibe? Or is it Steve Jobs’ charisma? Truth be told, my choice today is driven purely by habit and instinct, much like the unspoken understanding between old friends—it simply no longer requires any specific reason. Of course, Apple’s path of growth hasn’t always been smooth sailing; there have been valleys along the way. But one thing must be acknowledged: its corporate positioning over the past 50 years has remained almost completely unchanged—to create powerful tools for individuals and society. Even in the latest wave of AI, where Apple seems to have lost the first-mover advantage, as the core player connecting people to the digital world in that “last centimeter,” it still holds the capital to remain at the center of the table in the AI era. After all, we live in a physical world, and we need tangible hardware and personalized services to truly enjoy the fruits of technological progress. Apple at 50 might offer an inspiration to other companies: rather than imitating its “cool” and “innovative” exterior, it is better to learn from its focus and persistence. Becoming a long-term companion to its users is perhaps the true secret to its success. In all likelihood, ten years from now, when Apple turns 60 and I turn 61, I will still be using a Mac. Happy Birthday, Apple! Previous Issue|Newsletter Archive This Week’s SponsorNative AI chat app — ultra-fast, privacy-first, 100+ pro featuresOne native app, 100+ AI models on Mac, iOS, and Android. Fast, keyboard-driven, no Electron. 25% off for a limited time with code OriginalWhy I’m Still Thinking About Core Data in 2026By 2026, Core Data has been around for 21 years. While many developers still use it, in modern Swift projects it increasingly feels like a relic of an earlier era. Concurrency still relies on layers of Recent RecommendationsFortify Your App: Essential Strategies to Strengthen Security Q&ADuring a security-focused event hosted by Apple’s Developer Center, several Apple engineers spent nearly six hours discussing application security and memory safety, covering topics such as modern security challenges and the defensive technologies available across Apple platforms. Anton Gubarenko compiled and organized a large portion of the developer Q&A from the session. The discussion touches on topics such as evaluating the security of third-party libraries, risks when storing data with UserDefaults or plist files, best practices for Keychain and file protection, the safe use of Swift Faster iOS Subscriptions with ASC CLI and RevenueCat MCPAdding subscription support to an app isn’t particularly difficult, but configuring everything across both App Store Connect and RevenueCat can be surprisingly tedious. Rudrank Riyam introduces a more efficient approach: using the ASC CLI to create App Store Connect subscription products directly from the terminal, and then letting an AI agent configure the corresponding entitlements, offerings, and paywalls through RevenueCat’s MCP Server. This workflow effectively moves the entire setup process from manual dashboard interactions into a CLI + AI agent automation pipeline. JetBrains Swift Developers SurveyJetBrains recently released a survey aimed at Swift developers, inviting them to share the tools they use, their development workflows, and the pain points they encounter in the Swift ecosystem. Although JetBrains has not explained the specific purpose of the survey, the community has already started to speculate that it may be related to a renewed evaluation of Swift development tooling support. After JetBrains discontinued AppCode in 2022, most Swift developers returned to an Xcode-centric toolchain. This new survey has sparked some discussion: some developers hope JetBrains might revisit Swift tooling, while others suspect the effort could be more closely related to Kotlin Multiplatform or Swift build tooling. If you’re interested in the future direction of Swift development tools, you might want to take part in the survey. How Well Can You Detect a Swift Protocol Without the Compiler?Protocols are everywhere in Swift projects, but how reliably can you determine whether a Swift file defines or references a protocol without compiling the project or resolving its dependencies? In this article, Xiangyu Sun evaluates a variety of detection strategies, including SourceKit/LSP queries, SwiftSyntax AST parsing, simple keyword regex matching, and heuristic signals such as One particularly interesting finding is that simple naming conventions can dramatically improve static analysis accuracy. If a team consistently uses a What you should know before Migrating from GCD to Swift ConcurrencyMigrating from GCD to Swift Concurrency is not merely a matter of replacing syntax. In this article, Soumya Ranjan Mahunt highlights several important differences between the two concurrency models. Swift Concurrency differs from GCD in task scheduling, execution ordering, and concurrency semantics — differences that can introduce subtle data races or difficult-to-reproduce runtime issues during migration if not properly considered. For example, A 9-Step Framework for Choosing the Right Agent SkillAs AI agents become increasingly integrated into development workflows, designing the right “skills” (tools or capabilities) for those agents is emerging as a new engineering challenge. Antoine van der Lee proposes a nine-step framework to help determine when it actually makes sense to implement a dedicated agent skill. As Antoine points out, not every task should be delegated directly to an LLM, and not every capability needs to become an agent tool. The framework evaluates factors such as task determinism, execution cost, reusability, and security considerations, providing a structured way to reason about when and how to extend an AI agent’s capabilities. ToolsDataStoreKitThis is a particularly interesting open-source project developed by Anferne Pineda. It leverages SwiftData’s custom store capability to re-implement a SQLite-backed persistence engine while preserving SwiftData’s higher-level developer experience. The project maps SwiftData models, predicates, and queries to SQLite schemas, SQL execution, snapshots, and persistent history management. DataStoreKit also introduces several noteworthy capabilities. For example, it supports predicate queries on collection types such as arrays and dictionaries by mapping them to JSON structures stored in SQLite. It also exposes a SQL passthrough layer, allowing developers to bypass This is one of the few projects that explores SwiftData’s Playwright for SwiftDeveloped by Miguel Piedrafita, Under the hood, the project does not re-implement a browser automation framework. Instead, it wraps the Playwright protocol on the Swift side while continuing to communicate with browsers through the Node.js Playwright driver. For developers interested in building testing tools, CLI utilities, or even AI agents using Swift, this project offers a compelling entry point. Thanks for reading Fatbobman’s Swift Weekly! This post is public so feel free to share it. 50 岁的苹果和 51 岁的我再有不到半个月,Apple 将迎来 50 岁生日。Tim Cook 也发表了一篇短文,致敬过去半个世纪的历程。不过,由于苹果一直以来始终引领潮流的形象,很多人并没有意识到它已经是 IT 产业中名副其实的元老。与它年龄相当的 IT 巨头,如今仍留在一线牌桌上的寥寥无几。 作为一个只比苹果大一岁的科技爱好者,从 Apple II 到如今的 iPhone、MacBook,苹果的产品几乎伴随我走过了大半人生。严格来说,我并不算真正的果粉——不会因为没能第一时间买到新品而遗憾,也几乎不再熬夜看发布会,更说不出新产品的具体参数。但回顾过去,在每一个人生节点上,我都会很自然地选择苹果的产品,并在近几年成为了苹果开发生态中的一员。 其实我也没有完全想明白,苹果对我持久的吸引力究竟来自哪里。是因为很早就开始使用它的产品?是它的创新、体验和气质?还是 Jobs 的人格魅力?说实话,如今的选择已经完全出于习惯和本能,就像老友间的默契,早已不需要什么特别的理由。 当然,苹果的成长之路并非一帆风顺,其间也有过低谷。但有一点必须承认:它在过去 50 年间的企业定位几乎没变——为个人和社会创造强大的工具。即便在最新一轮 AI 浪潮中,苹果看似失去了先机,但作为连接人与数字世界的“最后一厘米”的核心参与者,它仍然具备在 AI 时代留在牌桌中央的资本。毕竟,我们生活在物质世界中,需要实打实的硬件设备和个人化服务来享受技术进步的成果。 50 岁的苹果或许能给更多企业带来启示:与其模仿它“炫酷”、“创新”的外表,不如学习它的专注与坚持。成为与用户长久互相陪伴的伙伴,或许才是它成功的真正密码。 大概率再过十年,当苹果 60 岁、我 61 岁的时候,我仍然用着一台苹果电脑。 生日快乐,苹果! 本期赞助原生 AI 聊天应用 — 极速、隐私优先、100+ 专业功能一个原生应用,100+ AI 模型,支持 Mac、iOS 和 Android。极速响应、键盘驱动、非 Electron。限时优惠,使用码 原创2026 年,为什么我仍在思考 Core Data到 2026 年,Core Data 已经问世 21 年,尽管仍有不少开发者在使用它,但在今天的 Swift 项目里,它越来越像个“时代遗留”。并发得靠 近期推荐苹果工程师谈应用安全与内存保护 (Fortify Your App: Essential Strategies to Strengthen Security Q&A)在苹果开发者中心举办的一场安全专题活动中,多位苹果工程师围绕应用安全与内存安全进行了近六小时的分享与问答,内容涵盖现代应用面临的安全挑战,以及 Apple 平台提供的一系列防护技术。Anton Gubarenko 将这场活动中的大量开发者问答整理成文,讨论了第三方库安全评估、UserDefaults 与 plist 数据存储的风险、Keychain 与文件保护策略、Swift 用 CLI 与 MCP 自动化配置 iOS 订阅 (Faster iOS Subscriptions with ASC CLI and RevenueCat MCP)为应用添加订阅功能本身并不复杂,但在 App Store Connect 与 RevenueCat 两个后台之间来回配置,过程往往相当繁琐。Rudrank Riyam 介绍了一种更高效的做法:使用 ASC CLI 在终端中一次性创建订阅产品,再让 AI 代理通过 RevenueCat 的 MCP Server 自动完成 entitlements、offerings 与 paywall 的配置,从而将原本依赖控制台点击的流程迁移到 CLI + AI Agent 的自动化工作流中。 JetBrains 面向 Swift 开发者的调查 (JetBrains Swift Developers Survey)JetBrains 最近发布了一份面向 Swift 开发者的调研问卷,邀请开发者分享当前使用的开发工具、工作流程以及在 Swift 生态中的痛点。尽管官方并未说明调研的具体用途,但社区中已经出现不少猜测:这项调查可能与 JetBrains 重新评估 Swift 开发工具支持有关。 在 JetBrains 于 2022 年宣布停止维护 AppCode 之后,Swift 开发者基本回到了以 Xcode 为核心的工具链。此次调研也引发了一些讨论——有人期待 JetBrains 重新探索 Swift tooling 的可能性,也有人认为这更可能与 Kotlin Multiplatform 或 Swift 构建工具链相关。如果你对 Swift 开发工具生态的未来方向感兴趣,不妨参与这份调查。 不依赖编译器识别 Swift Protocol 的方法 (How Well Can You Detect a Swift Protocol Without the Compiler?)在 Swift 项目中,Protocol 几乎无处不在,但如果不依赖编译器或完整构建环境,仅通过源码文本判断一个文件是否定义或使用了协议,结果会有多可靠?Xiangyu Sun 在这篇文章中系统评估了多种检测策略,例如使用 SourceKit/LSP、SwiftSyntax AST、关键字正则匹配,以及通过 文章最有意思的部分在于作者发现:简单的命名约定可以显著提升静态分析效果。如果团队统一使用 迁移到 Swift Concurrency 前需要注意的细节 (What you should know before Migrating from GCD to Swift Concurrency)从 GCD 迁移到 Swift Concurrency 并非简单的语法替换。在这篇文章中,Soumya Ranjan Mahunt 指出:Swift Concurrency 在任务调度、执行顺序以及并发语义上与 GCD 存在一些关键差异,例如 选择 AI Agent Skill 的九步框架 (A 9-Step Framework for Choosing the Right Agent Skill)随着 AI Agent 在开发工作流中的应用越来越广泛,如何为 Agent 设计合适的“技能”(Skill / Tool)也逐渐成为一个新的工程问题。Antoine van der Lee 提出了一个用于判断何时应该为 Agent 创建技能的九步框架,帮助开发者在自动化能力、可维护性以及系统复杂度之间取得平衡。Antoine 指出,并非所有任务都适合直接交给 LLM,也并非所有能力都需要实现为 Agent 工具。文章从任务确定性、执行成本、可复用性以及安全性等角度出发,提供了一套相对系统的评估思路。 工具DataStoreKit这是一个很有意思的开源项目,由 Anferne Pineda 开发。它基于 SwiftData 的自定义 store 能力,在保留 SwiftData 上层开发体验的同时,重新实现了一套面向 SQLite 的底层存储后端,包括从 SwiftData 模型、谓词到 SQLite schema、SQL、快照与持久化历史的映射和执行。 DataStoreKit 提供了一些值得关注的特性,例如支持对数组、字典等集合类型数据进行谓词查询,底层以 JSON 形式映射到 SQLite;同时也提供了 SQL 直通能力,让开发者在 这是目前为数不多、且实现深度较高的 SwiftData Playwright for SwiftMiguel Piedrafita 开发的 从实现方式上看,它并不是重新实现一套浏览器自动化框架,而是在 Swift 侧封装了 Playwright 协议,底层依然通过 Node.js 的 Playwright driver 与浏览器通信。对于希望使用 Swift 构建测试工具、CLI,甚至 AI Agent 的开发者来说,这个项目提供了一个颇具吸引力的切入点。 活动LET’S VISION 2026 -- Born to Create · Powered by AI
如果你是开发者、设计师、产品经理、创作者,还是对 AI 和未来科技感兴趣的探索者,都很值得来逛逛。
Welcome to my blog Fatbobman's Swift Blog( 肘子的Swift记事本 ) |

