Xcode 26 beta 4: If We're Going Down, We're Going Down Together
Despite some minor issues, I had a pretty good impression of the previous beta versions of Xcode 26. Both the refreshing visual experience and the clearer annotations for AI-generated code were quite impressive. However, after recently updating to beta 4, these positive feelings quickly dissipated due to frequent Preview crashes.
In Xcode 26 beta 4, whenever I use the Preview feature, Xcode typically freezes within just a few seconds to tens of seconds. What's even more terrifying is that this is immediately followed by an unexpected system crash and restart. I was truly shocked when I first encountered this—it was my first experience with an unexpected system crash on macOS 26. But when every single preview session inevitably triggers this scenario, I can be certain that Xcode's preview functionality is the culprit.
After searching online, I discovered that this was actually a known issue before the release, which left me even more bewildered and amused. I have to say, the "power" of this bug is truly remarkable—even deliberately writing malicious code to crash the system might not be this "simple and direct."
Since I started using Claude Code, I've almost completely switched back to Xcode from Cursor. Just when I was marveling at finally being able to have the best of both worlds (enjoying an excellent visual experience while having powerful AI assistance), the emergence of this issue is genuinely disheartening.
I hope beta 5 can fix this problem quickly, otherwise what crashes won't just be Xcode and the system—but also our patience and confidence as developers.
The system crashes caused by Preview are more likely due to the iOS 26 simulator. Even when using Xcode 16.4 + macOS 26, setting the preview environment to iOS 26 will still cause crashes.
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
Default Actor Isolation: New Problems from Good Intentions
While Swift’s strict concurrency checking has good intentions, it significantly increases the burden on developers in many single-threaded scenarios. Developers are forced to add unnecessary Sendable
, @MainActor
, and other declarations to their code just to satisfy the compiler’s requirements. Swift 6.2’s new Default Actor Isolation feature will greatly improve this situation and reduce unnecessary boilerplate code. This article will introduce the Default Actor Isolation feature and point out some situations to be aware of when using it.
Recent Recommendations
A SwiftUI Wish List
Former Safari engineer James Savage, who was deeply involved in SwiftUI, App Clips, and multi-window system projects, presents a series of SwiftUI improvement visions based on his experience at Apple. These include introducing low-level lifecycle management mechanisms similar to Swift's Span, expanding Transaction's application boundaries, providing support for interactive transition animations, and opening up more visual and behavioral customization interfaces for TextField. The core of these ideas is to make SwiftUI more independent and flexible, truly capable of handling complex UI construction needs.
What Is a Mobile Platform Engineer?
In many large companies, there's a role crucial to team efficiency: platform engineers. Their "users" are internal developers, focusing on building shared tools, modules, and architectures to improve the entire development team's collaboration efficiency and delivery quality. Beyond technical skills, platform engineers need strong communication abilities, project coordination skills, and the capability to drive cross-team changes, serving as bridges connecting technical implementation with organizational development. Tjeerd in 't Veen combines years of frontline experience to deeply analyze this role's responsibilities, challenges, and value.
SwiftUI for Mac 2025
As the author of macOS by Tutorials, troz has been closely following SwiftUI's evolution on macOS. In this article, troz shares some new features and practical tips for SwiftUI on macOS 26 in 2025, demonstrating key updates like new icon formats, native WebView support, rich text editing, and Liquid Glass control styles through a companion sample app.
Liquid Glass - 5 Things You MUST Know Before Implementing
Liquid Glass is undoubtedly one of the most striking design changes from WWDC 2025. However, truly mastering it requires more than just applying visual effects—it demands understanding the design philosophy behind it. In this video, Sean Allen summarizes five key points developers must understand before implementing Liquid Glass: prioritize native components; treat Glass as floating control layers rather than background decoration; use colors restrainedly to avoid compromising layer readability; understand and follow "Concentricity" design; use Icon Composer to redesign unified cross-platform icons. Sean emphasizes that Liquid Glass isn't just a visual upgrade—it's a deep unification of design language and system ecosystem. Embracing it is what keeps your app modern and consistent in the new generation of systems.
Assembler for Swift Developers
With improving hardware performance and the popularity of high-level languages, modern developers rarely need to touch assembly code. However, Artur Gruchała believes that understanding assembly remains very valuable for Swift developers—it helps us better understand how Swift maps to underlying instructions and enables more efficient debugging when facing performance bottlenecks or low-level crashes. In this article, Artur demonstrates how to create a command-line project in Xcode, add .s assembly files, and compile them as program entry points, ultimately building a minimal assembly program that outputs "Hello, Assembly!" in the terminal. This tutorial for iOS/macOS developers focuses not on assembly syntax itself, but on helping developers establish cognitive pathways from high-level languages to underlying hardware. Artur also previews upcoming articles that will further explore pointers, function calls, and stack/heap usage, worth continued attention.
Two-Way-Door Decisions in Mobile Development Architecture
"Two-way-door" decisions are those with limited and reversible consequences—if results don't meet expectations, you can backtrack and try different approaches. Xiangyu Sun applies Amazon's decision-making theory to mobile development architecture choices, helping developers identify which technical decisions are reversible and thus enabling quick action. Through six specific cases including dependency injection library selection, navigation frameworks, data storage strategies, analytics SDK integration, build systems, and app modularization, the author details how to make high-quality, high-velocity technical decisions in mobile development. The core message is: most architectural choices are reversible, so developers should avoid analysis paralysis and instead implement quickly and adjust based on feedback.
SwiftUI Search Enhancements in iOS and iPadOS 26
In iOS/iPadOS 26, search bar behavior has undergone significant adjustments, not only in positioning but also introducing new interaction logic (such as search tabs in TabView) and Liquid Glass design styling. Natalia Panferova demonstrates in detail how to leverage new APIs and design language to build modern search interfaces. The article provides complete code examples through two main patterns—toolbar search and tab bar search—while detailing different behaviors on iPhone and iPad, as well as how to properly handle version compatibility issues.
Blissful UI Development with SwiftUI and Godot
SwiftUI's fast compilation and ease of use make it an excellent UI implementation solution for projects based on frameworks like SceneKit, Unity, and SpriteKit. Miguel de Icaza shares how to seamlessly integrate SwiftUI with the Godot game engine, using it as the UI layer implementation for the Xogot editor. The article focuses on how to leverage the Observation framework to build a bidirectional data binding pattern, managing complex editor state through 156 Observable objects while maintaining SwiftUI preview's rapid iteration capabilities and achieving deep integration with the Godot engine.
How I Stopped a Silent Memory Leak in My iOS App
Egzon Pllana discovered a hidden memory leak problem while using his own iOS app—each tab switch increased memory usage by 10-15MB, with memory bloating from 196MB to over 310MB after ten minutes of use. Through thorough diagnostic analysis, Egzon successfully optimized memory usage by 85%. The article deeply analyzes three main sources of memory leaks: misuse of SwiftUI's .id()
modifier causing view recreation, improper async task lifecycle management, and strong reference cycles with Timer objects. Beyond providing detailed problem analysis and specific solutions, the author also open-sourced his custom memory monitoring tool, offering other developers a practical debugging tool.
Xcode 26 beta 4,要崩我们一起崩
尽管仍有一些小问题,但我对 Xcode 26 之前几个测试版本的印象还是挺不错的。无论是焕然一新的视觉体验,还是为 AI 生成代码提供的更清晰标注,都让人眼前一亮。然而,在最近更新到 beta 4 后,这些好感却因为 Preview 的频繁崩溃而迅速消散。
在 Xcode 26 beta 4 中,只要使用 Preview 功能,通常仅需几秒到几十秒,Xcode 便会出现卡死症状。更可怕的是,紧接着就是毫无预警的系统崩溃重启。第一次遇到时,我着实震惊了——这是我在 macOS 26 上遇到的首次无预警系统崩溃。但当每次使用预览都必然触发这种情况时,我可以肯定,罪魁祸首就是 Xcode 的预览功能。
上网搜索后发现,这竟然是一个在发布前就已知晓的问题,这让我更加哭笑不得。不得不说,这个 Bug 的“威力”确实惊人——即便是专门编写恶意程序来让系统崩溃,也未必能如此“简单直接”。
自从开始使用 Claude Code 后,我几乎完全从 Cursor 切换回了 Xcode。正当我感叹终于可以鱼和熊掌兼得(既享受优秀的视觉体验,又拥有强大的 AI 辅助)时,这个问题的出现着实让人沮丧。
希望 beta 5 能尽快修复这个问题,否则崩溃的可就不仅仅是 Xcode 和系统了——还有我们开发者的耐心和信心。
经进一步研究发现,预览导致系统崩溃的问题更可能是由 iOS 26 模拟器引起的。即便使用稳定版 Xcode 16.4 搭配 macOS 26,只要将预览环境设置为 iOS 26,同样会导致系统崩溃。
如果您发现这份周报或我的博客对您有所帮助,可以考虑通过 爱发电,Buy Me a Coffee 支持我的创作。
原创
Default Actor Isolation:好初衷带来的新问题
尽管 Swift 严格并发检查的初衷是好的,但对于很多单线程场景来说,却明显增加了开发者的负担。开发者不得不在代码中添加一些并不必要的 Sendable
、@MainActor
等声明,只为了满足编译器的要求。Swift 6.2 新增的 Default Actor Isolation 功能将极大地改善这种状况,减少不必要的样板代码。本文将对 Default Actor Isolation 功能进行介绍,并指出在使用该功能后需要注意的一些情况。
近期推荐
SwiftUI 愿景 (A SwiftUI Wish List)
前 Safari 工程师 James Savage,曾深度参与 SwiftUI、App Clips 与多窗口系统等项目。在这篇文章中,他基于自身在 Apple 的经验,提出了一系列 SwiftUI 的改进愿景:包括引入类似 Swift 中 Span 的低阶生命周期管理机制、拓展 Transaction 的应用边界、提供交互式过渡动画的支持,以及开放更多 TextField 的视觉与行为自定义接口等。这些设想的核心在于——让 SwiftUI 更加独立、灵活,能真正承载起复杂 UI 的构建需求。
什么是平台工程师?(What Is a Mobile Platform Engineer?)
在不少大型公司中,有一个对团队效率至关重要的角色:平台工程师。他们的“用户”是公司内部的开发者,工作重点在于构建共享工具、模块与架构,以提升整个开发团队的协作效率与交付质量。除了技术能力,平台工程师还需具备良好的沟通能力、项目协调力与跨团队推动变革的能力,是连接技术实现与组织发展的桥梁。Tjeerd in ’t Veen 在本文中,结合多年一线经验,深入剖析了这一岗位的职责、挑战与价值所在。
SwiftUI for Mac 2025
作为 macOS by Tutorials 一书的作者,troz 一直密切关注 SwiftUI 在 macOS 上的演进。在这篇文章中,troz 分享了 2025 年 SwiftUI 在 macOS 26 上的一些新特性与实用技巧,并通过配套的示例 App展示了如新图标格式、WebView 原生支持、富文本编辑、Liquid Glass 控件样式等关键更新。
Liquid Glass 使用前须知 (Liquid Glass - 5 Things You MUST Know Before Implementing)
Liquid Glass 无疑是 WWDC 2025 中最引人注目的设计变革之一。但想要真正驾驭它,并不仅仅是套用视觉效果,更需要理解其背后的设计理念。在这段视频中,Sean Allen 总结了开发者在适配 Liquid Glass 前必须了解的五个关键点:优先使用原生组件;将 Glass 视为悬浮的控制层而非背景装饰;克制使用颜色,避免破坏图层可读性;理解并遵循“同心圆设计(Concentricity)”;使用 Icon Composer 重新设计统一的跨平台图标。Sean 强调,Liquid Glass 不只是视觉升级,更是一次设计语言与系统生态的深度统一。拥抱它,才能让你的 App 在新一代系统中保持现代感与一致性。
Swift 开发者的汇编入门 (Assembler for Swift Developers)
随着硬件性能提升与高级语言的普及,现代开发者几乎无需接触汇编代码。但 Artur Gruchała 认为,对 Swift 开发者而言,理解汇编依然非常有价值——它能帮助我们更清晰地理解 Swift 是如何映射到底层指令的,也能在面对性能瓶颈或底层崩溃时,更高效地进行调试分析。在本文中,Artur 演示了如何在 Xcode 中创建 command-line 工程,添加 .s 汇编文件,并将其作为程序入口进行编译,最终构建一个能在终端输出 “Hello, Assembly!” 的最简汇编程序。这篇面向 iOS/macOS 开发者的教程,重点并非汇编语法本身,而是帮助开发者建立从高级语言到底层硬件的认知路径。Artur 也预告了后续文章将进一步深入指针、函数调用以及栈与堆的使用,值得持续关注。
移动开发中的双向门决策 (Two-Way-Door Decisions in Mobile Development Architecture)
"双向门"决策是指具有有限且可逆后果的决定——如果结果不如预期,你可以回溯并尝试不同的方法。Xiangyu Sun 将亚马逊的这一决策理论应用到移动开发架构选择中,帮助开发者识别哪些技术决策是可逆的,从而能够快速行动。作者通过依赖注入库选择、导航框架、数据存储策略、分析 SDK 集成、构建系统和应用模块化等 6 个具体案例,详细阐述了如何在移动开发中做出高质量、高速度的技术决策。文章的核心观点是:大多数架构选择都是可逆的,开发者应该避免过度分析导致的决策瘫痪,而是快速实施并根据反馈进行调整。
更强的 SwiftUI 搜索 API (SwiftUI Search Enhancements in iOS and iPadOS 26)
在 iOS/iPadOS 26 中,搜索栏的行为有了显著调整,不仅体现在位置变化上,还引入了全新的交互逻辑(如 TabView 中的搜索标签)和 Liquid Glass 设计风格。Natalia Panferova 在本文中详细展示了如何利用新的 API 和设计语言来构建现代化的搜索界面。文章通过工具栏搜索和标签栏搜索两种主要模式,提供了完整的代码示例,并详细说明了在 iPhone 和 iPad 上的不同表现形式,以及如何妥善处理版本兼容性问题。
用 SwiftUI 为 Xogot 开发 UI (Blissful UI Development with SwiftUI and Godot)
SwiftUI 编译迅速、使用方便,因此非常适合作为基于 SceneKit、Unity、SpriteKit 等框架项目的 UI 实现方案。Miguel de Icaza 在本文中分享了如何将 SwiftUI 与 Godot 游戏引擎无缝集成,将其作为 Xogot 编辑器的 UI 层实现。文章重点探讨了如何利用 Observation 框架构建一套双向数据绑定模式,通过 156 个 Observable 对象管理复杂的编辑器状态,既保持了 SwiftUI 预览的快速迭代能力,又实现了与 Godot 引擎的深度集成。
内存泄漏排查实录 (How I Stopped a Silent Memory Leak in My iOS App)
Egzon Pllana 在日常使用自己的 iOS 应用时发现了一个隐藏的内存泄漏问题——每次切换标签页都会增加 10-15MB 内存占用,十分钟使用后内存从 196MB 急剧膨胀到 310MB+。通过详尽的诊断分析,Egzon 最终成功将内存使用优化了 85%。文章深入剖析了三个主要的内存泄漏源:SwiftUI .id()
修饰符的误用导致视图重复创建、异步任务生命周期管理不当,以及 Timer 对象的强引用循环。除了提供详细的问题分析和具体修复方案外,作者还将自制的内存监控工具开源,为其他开发者提供了一个实用的调试利器。
Last time this kind of bug happened and I had to download the old version of OS, I decided to NEVER install Beta on a working machine. And Previews are now so deep into process so it's hard t get back to Simulator runs all the time.