
Photographing My Fur Babies
I have a 13-year-old dog and a cat who's just over six. Over the years, I've taken my dog to a pet photography studio almost annually, but my cat's severe social anxiety has kept him from joining these photo sessions. In the past year, though, we've noticed some improvement in our cat's demeanor. While he still resists going outside, he now recovers in just minutes after returning from baths or vet visits, rather than the hours it used to take. Seeing this progress, my wife and I decided to take a chance this year by bringing both furry brothers to the studio, hoping to capture a wonderful photo of them together.
For this photoshoot (last weekend), we prepared extensively. Beyond booking a more relaxed and generous time slot, we packed an "emergency kit" of their favorite treats, toys, and familiar blankets, particularly concerned that the studio environment might stress our cat. To our delight, despite our cat's face clearly saying "I'm not happy about this" throughout the entire session, the photoshoot went relatively smoothly—though the coveted dog-and-cat portrait didn't quite meet our expectations.
But the real test was just beginning. After the photoshoot, my wife and I kept a watchful eye on our cat's every move. He seemed fine on the surface, but we couldn't shake a feeling of unease. Sure enough, the morning after the photoshoot, he had diarrhea, which sent our anxiety through the roof. Fortunately, after two bouts, everything appeared to return to normal—his energy was good, and his appetite remained strong. However, later that day, my wife reported that our cat's urination didn't seem as smooth as usual and instructed me to monitor him closely. Cat owners know that urinary issues can be quite serious for felines and are often triggered by stress.
This morning (before sitting down to write this newsletter), our cat seemed to sense our worries. He approached me with a soft meow, guiding me to follow him to his private bathroom. Under my watchful eye, he leisurely drank water for a few minutes, then smoothly completed his urination before darting off to play—demonstrating his healthy physical condition through actions rather than words—leaving me both relieved and amused.
Though cats and dogs don't speak human language, they're certainly not lacking in intelligence. They can keenly sense your concern and respond in their own ways. While caring for them certainly requires effort, the pure emotional connection they provide far exceeds what we invest. I'm incredibly grateful for these little beings who bring such warmth to human society.
I've just scheduled another photoshoot with the studio for six months from now. I'm hoping to finally realize my small wish—to recreate the scene from my cartoon avatar: a perfect portrait with my fur babies sitting quietly on either side of me.
In this age where large language models increasingly blur the line between human and AI communication, making interactions with AI feel almost indistinguishable from those with real people, I still cherish the wordless yet deeply connected communication I share with my pets. That subtle, authentic beauty is a living connection that even the most advanced technology can never replace.
Previous Issue|Newsletter Archive
If you appreciate my work and want to promote your product to the Swift and iOS developer community, sponsoring my blog & newsletter could be an excellent opportunity for you.
Original
Using Proxyman to Intercept and Simulate iPhone App Network Requests
In the Internet age, developers increasingly interact with network data. Just as we rely on the debugging features of our IDEs to optimize our code, network debugging tools have become indispensable assistants for quickly, efficiently learning, researching, and analyzing network data. This article explains how to use Proxyman to capture the network request information of an iPhone app and simulate server responses by providing mock data. This allows you to test and develop applications without relying on a real server.
Recent Recommendations
Why I Avoid Group
Group
is a convenient tool in SwiftUI for applying modifiers to multiple views at once, but its behavior can be unreliable in certain scenarios. In this post, Chris Eidhof shares why he avoids using Group
in practice, pointing out that it doesn't create a real container view but merely provides ViewBuilder syntax. He also highlights inconsistent behavior of modifiers like .background
between Previews and the Simulator, and unexpected onAppear
execution. These issues become even more pronounced at the boundary between SwiftUI and UIKit. Chris recommends using stable containers like VStack
or ZStack
instead, for more predictable view structures.
Implementing Sign in with Apple in the watchOS Simulator
Since Sign in with Apple isn’t supported in the watchOS Simulator, it can be a major hurdle during development. In this post, Leo Dion describes a clever workaround used by the BrightDigit team: the server writes temporary authentication data to the Simulator, while the client watches for file changes and triggers the login flow. This approach simulates a realistic login experience during development and integrates cleanly into existing authentication architectures—making it especially useful for those testing login functionality on watchOS.
Color Space in Color-Specific APIs
Color management has long been one of Apple's strongest areas, but mishandling color spaces can easily lead to display mismatches or inconsistencies across platforms. In this article, Weichao Deng dives deep into how common Apple APIs like UIColor
, Color
, and NSColor
handle color spaces, covering asset catalog color definitions, differences in initialization across frameworks, and caveats when accessing component values. A must-read for anyone who cares about consistent color rendering across Apple platforms.
Building a MCP server in Swift
The Model Context Protocol (MCP) is one of the most exciting emerging concepts, extending LLM capabilities to interact with real-world data and tools. For Apple platform developers, building an MCP server in Swift is an excellent way to get started. In this post, Adam Wulf shares his experience using the mcp-swift-sdk to implement a basic MCP server. He explains the architecture, stdio-based transport, tool registration and invocation, and how to integrate with Cursor and Claude for testing and development.
The
mcp-swift-sdk
is a Swift implementation of the MCP spec by Mattt, who also built iMCP, a macOS app that grants MCP clients access to system calendar, contacts, messages, reminders, and weather data.
Solving Swift Macro Trust Issues in Xcode Cloud Builds
Swift macros offer powerful capabilities, but they often cause build failures in Xcode Cloud due to trust errors like “Target must be enabled.” In this article, Cihat Gündüz presents a simple and effective fix: add a ci_scripts/ci_post_clone.sh
script to disable Xcode’s macro fingerprint validation before the build. He explains why this works, discusses the security tradeoffs, and highlights why this workaround will become increasingly important as macros gain traction in the Swift ecosystem.
Git Hooks 🤝 Swift
Git hooks are a great way to automate code checks and validations at commit time, yet many Apple developers avoid them due to unfamiliarity with bash. In this article, Natan Rolnik demonstrates how to gradually adopt Swift for Git hooks—starting with shell scripts, then moving to Swift scripts and finally compiled executables. He shares practical examples like enforcing commit message prefixes ([feature]
, [bugfix]
, etc.) and rejecting commits containing print
or TODO
statements, showcasing how Swift can bring maintainability and flexibility to your automated workflows.
给毛孩子照相
我有一只 13 岁的狗狗和一只六岁多的猫咪。这些年来,我几乎每年都会带狗狗去宠物照相馆拍照,但由于猫咪过于社恐,一直不敢带他出门拍照。近一年来,我们发现猫咪的状态似乎有了些许改善。虽然他仍然抗拒出门,但在洗澡或去医院回家后,不再需要几个小时才能平复情绪,现在只消几分钟就能恢复正常。看到这样的进展,我和太太决定今年冒险一试,带这兄弟俩一起去拍照,最好还能拍下一张精彩的合影。
为了这次拍摄行动(上个周末),我们做了充分的准备工作。除了预约了更宽松、更充裕的拍摄时段外,还为毛孩子们准备了一系列“应急物资”——它们钟爱的零食、玩具、习惯的毯子等,尤其担心拍照环境会让猫咪产生应激反应。令人欣喜的是,尽管猫咪全程写满了“我不情愿”四个大字,但拍摄工作还是相对顺利地完成了,只是期待中的猫狗合照不太如人意。
然而,真正的考验此时才刚刚开始。拍照结束后,我和太太开始时刻关注猫咪的一举一动。表面上他看起来很正常,但我们心里总有一丝不安。果不其然,拍照后的第二天早晨,他腹泻了,这一状况让我们的心一下提到了嗓子眼。所幸在腹泻两次后,一切似乎又回归正常——精神状态良好,食欲也不减。然而过了半天,太太又向我报告,猫咪的排尿似乎没有往日那么顺畅,叮嘱我要密切观察。养过猫的朋友都知道,排尿不畅对猫咪而言是相当严重的问题,很可能是应激反应导致的。
今早(在我落笔写这篇周报前),猫咪仿佛读懂了我们的忧虑,主动来到我身边轻声唤我,示意我跟随他去往他的专属卫生间。在我的注视下,他先是悠然自得地喝了几分钟水,接着顺畅地完成了排尿大业,随后便一溜烟地跑去玩耍,用实际行动展示了他健康的身体状态,留下我一人哭笑不得。
猫狗虽然不会说人类的语言,但它们的智商并不低。它们能敏锐地感受到你的关切,并以自己的方式给予回应。照顾它们确实需要投入不少心力,但从它们身上获得的那份纯粹的情感回馈,远远超出了我们的付出。我无比庆幸有这些小生灵给人类社会带来更多的温情。
刚才,我已经与宠物照相馆约定了六个月后的再次拍摄。期待下次能够实现我的小愿望——拍出和我卡通头像一样的理想中的合照:两个毛孩子安静地分坐在我的左右。
在这个大模型不断模糊人类与 AI 之间交流界限的时代,AI 让我们产生与真人对话无异的互动体验。然而,我更珍视与猫狗之间那种无需言语却心灵相通的交流方式——那种朦胧而真实的美感,是科技再发达也无法取代的生命连结。
如果您发现这份周报或我的博客对您有所帮助,可以考虑通过 爱发电,Buy Me a Coffee 支持我的创作。
原创
使用 Proxyman 拦截和模拟 iPhone 应用的网络请求
在互联网时代,开发者日益频繁地与网络数据打交道。正如我们依赖 IDE 的调试功能来优化代码一样,网络调试工具已成为我们快速、高效地学习、研究和分析网络数据不可或缺的助手。本文将介绍如何利用 Proxyman 来捕获 iPhone 应用的网络请求信息,并通过提供 Mock 数据来模拟服务器响应,帮助开发者在不依赖真实服务器的情况下进行应用测试与开发。
近期推荐
为什么我避免使用 Group (Why I Avoid Group)
Group
是 SwiftUI 中一个便于统一修饰多个视图的工具,但它的行为在某些场景下并不可靠。Chris Eidhof 在本文中分享了他为何在实际开发中尽量避免使用 Group
,指出其并不会生成真正的容器视图,只是提供 ViewBuilder 的语法支持;在模拟器与预览中,某些修饰符(如 .background
)的表现存在明显差异;而 onAppear
的调用也与文档描述不符。在 UIKit 与 SwiftUI 的交界区域中,这些问题更为突出。Chris 建议使用 VStack
、ZStack
等稳定容器作为替代,提升视图结构的可预期性。
在 watchOS 模拟器中实现 Sign in with Apple (Implementing Sign in with Apple in the watchOS Simulator)
由于 watchOS 模拟器不支持 Sign in with Apple,给开发带来不少不便。Leo Dion 在文中介绍了 BrightDigit 团队在开发 Apple Watch 健身应用时采取的一种变通方案:由服务器向模拟器写入临时文件以传递认证信息,并通过客户端监听文件变化触发登录流程。这种方法不仅能在开发过程中模拟真实的登录体验,还可灵活融入现有的认证架构,对于在模拟器中调试 watchOS 登录逻辑的开发者非常实用。
🪜 苹果 API 中的色彩空间 (Color Space in Color-Specific APIs)
苹果生态的色彩管理机制一直是其最重要的护城河之一,但若对色彩空间处理不当,开发者很容易遇到色彩显示偏差或平台间不一致的问题。Weichao Deng 在本文中深入剖析了 Apple 各平台中常用的颜色相关 API(如 UIColor
、Color
、NSColor
)在处理色彩空间时的差异与细节,涵盖了 Assets 中颜色资源的色彩空间选择、不同框架下初始化方式对色彩空间的影响,以及访问颜色值时的注意事项。
用 Swift 构建 MCP 服务 (Building a MCP server in Swift)
MCP(Model Context Protocol)是当前最火热的概念之一,它扩展了大模型的能力,让 AI 能够与现实数据和操作场景深度整合。作为 Apple 平台开发者,最适合的切入方式就是使用熟悉的工具构建自己的 MCP 服务。在本文中,Adam Wulf 分享了他使用 Swift 库 mcp-swift-sdk 构建 MCP 服务端的实践经验,介绍了 MCP 的基本架构、通信机制(基于 stdio
)、工具注册与调用方式,以及如何在 Swift 中实现一个最简服务端。他还分享了将 MCP 集成到 Cursor 和 Claude 的调试流程。
mcp-swift-sdk
是由 Mattt 基于 MCP 规范实现的 Swift 库,同时他也开发了基于该库的 iMCP macOS 应用,使得 MCP 客户端具备读取系统日历、通讯录、消息、提醒事项及天气信息的能力。
解决 Xcode Cloud 构建时 Swift 宏的信任问题 (Solving Swift Macro Trust Issues in Xcode Cloud Builds)
Swift 宏为开发带来了巨大的灵活性,但在 Xcode Cloud 上构建时却常因“Target must be enabled”错误而中断流程。在本文中,Cihat Gündüz 提供了一种简单且有效的解决方案:通过在项目中添加 ci_scripts/ci_post_clone.sh
脚本,在构建前禁用宏的指纹验证,避免每次构建都卡在信任确认上。作者还进一步解释了这种方式为何可行、与安全性之间的权衡,以及为何这一方案会随着 Swift 宏广泛应用而变得愈发重要。
用 Swift 编写 Git Hooks (Git Hooks 🤝 Swift)
Git Hooks 是一种在代码提交关键节点自动执行规范检查、验证等操作的机制,但在 Apple 生态中,由于多数开发者不习惯使用 bash,往往被忽视。Natan Rolnik 在本文中从简单的 Bash 脚本出发,逐步演示了如何将 Swift 引入 Git Hooks 的开发流程,包括使用 Swift 脚本,乃至构建可执行文件。文中展示了如何检查 commit message 是否包含特定前缀(如 [feature]
),以及在提交前阻止包含 print
或 TODO
的代码等实用范例,体现了 Swift 在提升代码质量与自动化协作流程中的可维护性与灵活性。
求贤:【北京/上海/杭州/深圳】抖音——基础技术
同学,你喜欢 Swift 吗?我们诚邀身处 北京、深圳、上海、杭州 的你,和我们一起踏上这趟注定不平凡的旅途:
Swift 基础框架研发专家
岗位职责:参与抖音 Swift 技术规划,负责抖音 Swift 端体系化建设、通过 Swift 相关配套、DanceUI 声明式框架,在抖音内部进行 Swift 认知建设 & 布道,并参与移动端新技术调研与落地
岗位要求:有丰富的 iOS 端框架研发经验,掌握 Swift 和 C++,加分项:熟练逆向苹果系统层实现、持续关注 Swift 生态现状
SwiftToolchain 专家(For Swift 本地研发体验优化 )
岗位职责:参与 SwiftToolchain 技术规划,提升编译、调试效率,优化索引功能,通过数据驱动取得指标收益,参与新技术调研与落地
岗位要求:具备 iOS 构建工具链知识,掌握 SwiftCompiler、LLVM、LLDB、ld 等相关技术,有编译工具链优化经验,加分项:大规模项目中深度逆向苹果系统实现的经验,持续关注行业内最新技术动向,具备优秀的问题解决能力
iOS 端原生渲染研发专家
岗位职责:参与端原生渲染能力技术规划,负责研发与体验优化,建设配套设施,参与新技术调研与落地
岗位要求:有 iOS 端框架研发经验,掌握 Swift 和 C++,熟悉相关流程,加分项:熟悉图形渲染基本流程,有 Skia、OpenGL 或者 Vulkan、Metal 的优化经验,熟练逆向复杂的苹果系统层实现,熟悉 SwiftUI/Compose 等端上声明式框架,有丰富的实践经验
如果你想让你对 Swift 的热情化为实际的一行行代码,请将简历发往:renyujie.spatial@bytedance.com