Have You Completed Your Liquid Glass Adaptation?
Tomorrow marks the official release of iOS 26, and a large number of users are likely to upgrade immediately to experience the brand-new Liquid Glass design language. Compared to previous years, this year’s adaptation workload is significantly heavier—especially for apps with complex interactions, which may face many unexpected issues.
Liquid Glass isn’t just a visual refresh; it also introduces significant changes to interaction logic. Some system components differ drastically from older versions, and with many unresolved bugs still present at launch, users may find it hard to tell whether issues come from the system itself or from the apps. In the weeks ahead, developers will likely face an uphill battle, juggling user support and explaining that not all problems are their own.
Whether you love or dislike the new style, Liquid Glass will undoubtedly become a major selling point for the new iPhone. But if Apple were more proactive in providing comprehensive system components and documentation earlier, the ecosystem could embrace this new design language sooner and deliver a more consistent, polished experience to users.
Have you completed your Liquid Glass adaptation?
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.
Recent Recommendations
We Need to Talk About Observation
Three years after the Observation framework's debut, Jared Sinclair compares Observation with Combine's ObservableObject. While Observation reduces @Published
boilerplate, improves UI update efficiency, supports nested composition, and better aligns with structured concurrency and SwiftUI, it has notable drawbacks: @State
replacing @StateObject
causes frequent object recreation with high initialization costs; withObservationTracking
is complex, hard to discover and use correctly, and lacks a unified cancellation mechanism; Observations, despite introducing AsyncSequence, still has unclear cancellation and lifecycle management that can lead to memory issues; compared to Combine's AnyCancellable, the new approach is significantly less concise and user-friendly.
Nevertheless, the author believes @Observable is still Apple's right direction, especially promising when combined with SwiftUI and SwiftData. However, Apple's API design for non-UI programming scenarios lacks "opinionation," leaving developers to make architectural trade-offs.
Should you opt-in to Swift 6.2's Main Actor isolation?
Swift 6.2 introduces Default Actor isolation configuration, allowing developers to set default isolation for targets. Setting it to Main Actor makes code more intuitive like the early days of "executing on the main thread by default." While this design aims to simplify development in certain concurrency scenarios, it raises questions: how should different targets choose appropriate settings? In this article, Donny Wals shares his thoughts and strategies.
In Xcode 26, App Targets enable Main Actor by default while SPM Packages don't, a discrepancy that may confuse beginners or those unfamiliar with the feature. Perhaps it would be better to provide explicit options during project creation, allowing developers to make clear choices from the start.
Date Range picker in SwiftUI
Many apps require users to select date ranges (week, month, year, or custom intervals), but the system DatePicker often falls short. Kyryl Horbushko employs a "divide and conquer" design approach, breaking down the complex date range picker into multiple independent components (SegmentPicker, various date pickers, etc.), and cleverly uses MultiDatePicker
with state management to achieve continuous date range selection, avoiding the need to rebuild complex calendar components. The solution showcases the powerful combination of protocols, generics, and SwiftUI.
Understanding SwiftUI's TimelineView: A Deep Dive
TimelineView is a container view without its own appearance that redraws its content at scheduled time points, making it perfect for building real-time clocks, timers, animated visualizations, live data displays, or frame-by-frame animations. In this article, Kyle Ye not only introduces common TimelineView usage but also shares numerous implementation details from recreating this feature in OpenSwiftUI. The application and analysis of @Attribute
also provides excellent reference for understanding and mastering OpenAttributeGraph.
The Swift Android Setup I Always Wanted
Swift 6 introduces official Android NDK support, solving the long-standing barrier to using Swift on Android. Developers can now directly import Android without manually handling headers. Mikhail Isaev demonstrates how to elegantly use Swift on Android with JNIKit, detailing the complete workflow of quickly setting up Swift Android projects through VSCode + Dev Containers + Swift Stream IDE, which automatically pulls Docker images and toolchains and generates Gradle projects after configuration.
JNIKit wraps the tedious JNI C API into Swifty interfaces, greatly simplifying Swift-JVM interaction including class loading, object caching, and cross-thread environment binding.
SwiftUI Redraw System In Depth: Attributes, Recomputation, Diffing and Observation
Optimizing app performance in SwiftUI hinges on reducing unnecessary view redraws. However, this involves state management, dependencies, view comparison, and other mechanisms that many developers still don't fully understand despite SwiftUI being available for years. In this article, Mathis Gaignet breaks down SwiftUI's redraw process into four layers: "attributes → recomputation → diffing → observation," and combines Self._printChanges()
, Instruments' Effect Graph, Core Animation, and other tools to demonstrate through extensive experiments how different view declaration approaches impact performance.
Tools
Swift-Build GitHub Action
Configuring cross-platform CI/CD for Swift projects has never been easy. Leo G Dion's open-source swift-build GitHub Action simplifies everything: with just a few lines of configuration, you can run Swift Package Manager builds and tests on macOS and Linux, with built-in intelligent caching strategies that significantly boost CI efficiency. For deeper insights into how it works, check out the author's detailed introduction.
The Action is available on GitHub Marketplace, ready to add to your workflows, completely free.
AppKitUI
Many macOS developers still use AppKit but envy SwiftUI's declarative syntax and data binding. Darren Ford's AppKitUI elegantly bridges this gap: it provides SwiftUI-like chaining syntax, data binding, and layout systems for AppKit controls, letting you build complex NSView interfaces without XIB files, even supporting real-time preview in Xcode Preview. Compatible back to macOS 10.13, it's perfect for projects that need to support older systems while enjoying modern development experience.
完成 Liquid Glass 的适配了吗?
明天 iOS 26 就要正式发布了,必然会有大批用户第一时间升级,体验全新的 Liquid Glass 设计语言。相比往年,今年的适配工作量明显更大——尤其对于交互复杂的应用,可能会遇到许多意想不到的问题。
Liquid Glass 不仅仅是视觉风格的改变,它在交互逻辑上也有诸多调整。一些系统组件在新旧版本间差异巨大,加之临近发布时仍存在不少未解决的 Bug,用户很难分辨问题到底源自系统还是应用本身。可以预见,接下来几周,开发者们免不了要在用户支持和问题解释上打一场"硬仗"。
无论你是否喜欢 Liquid Glass 的视觉风格,它无疑会成为新 iPhone 的重要卖点。但如果苹果能在开发者体验上更具前瞻性,尽早提供完善的系统组件和文档支持,应用生态就能更快、更一致地拥抱这一新设计语言,最终让所有用户受益。
你完成 Liquid Glass 的适配了吗?
如果您发现这份周报或我的博客对您有所帮助,可以考虑通过 爱发电,Buy Me a Coffee 支持我的创作。
近期推荐
聊聊 Observation 框架 (We Need to Talk About Observation)
在 Observation 框架诞生三年之际,Jared Sinclair 对比了 Observation 与基于 Combine 的 ObservableObject。他指出,尽管 Observation 能减少 @Published
样板代码、提升 UI 更新效率、支持嵌套组合,并更契合结构化并发与 SwiftUI,但也存在一些问题:@State
替代 @StateObject
会导致对象频繁重建,初始化成本高;withObservationTracking
设计复杂、难以发现和正确使用且缺乏统一取消机制;Observations 虽引入 AsyncSequence,但仍存在取消和生命周期管理不清晰的问题,容易引发内存管理隐患;相较 Combine 的 AnyCancellable,新方案在简洁性和易用性上明显不足。
尽管如此,作者认为 @Observable 依然是苹果的正确方向,尤其在与 SwiftUI 和 SwiftData 结合时前景可期。但 Apple 在非 UI 编程场景的 API 设计上不够“有主见”,开发者仍需在架构层面权衡取舍。
Swift 6.2 的 Main Actor 隔离值得采用吗?(Should you opt-in to Swift 6.2’s Main Actor isolation?)
Swift 6.2 引入了 Default Actor isolation 配置,开发者可以为 Target 设置默认隔离。将其设为 Main Actor 让代码更贴近早期“默认在主线程执行”的直觉。尽管这一设计旨在简化部分并发场景下的开发,但也带来新的疑问:不同 Target 应该如何选择合适的设置?在这篇文章中,Donny Wals 分享了他的思考与策略。
在 Xcode 26 中,App Target 默认启用 Main Actor,而 SPM Package 默认不启用,这种差异可能让初学者或对该特性不熟悉的开发者感到困惑。或许更好的做法,是在项目创建时就提供显式选项,让开发者从一开始就能明确选择。
SwiftUI 日期范围选择器 (Date Range picker in SwiftUI)
在许多应用中,用户需要选择时间范围(周、月、年或自定义区间),而系统的 DatePicker 往往无法满足需求。Kyryl Horbushko 通过“分而治之”的设计思路,将复杂的日期范围选择器拆分为多个独立组件(SegmentPicker、各类型日期选择器等),并巧妙利用 MultiDatePicker
配合状态管理实现了连续日期范围选择,避免了重新构建复杂的日历组件。整个方案充分展示了协议、泛型和 SwiftUI 的强大组合能力。
深入理解 SwiftUI 的 TimelineView
TimelineView 是一个没有自身外观的容器视图,会在预定时间点重新绘制其内容,因而非常适合构建 实时时钟、计时器、动画可视化、实时数据或逐帧动画。在本文中,Kyle Ye 不仅介绍了 TimelineView 的常见用法,还分享了在 OpenSwiftUI 中复刻该功能时的诸多细节。其中对 @Attribute
的应用与解析,也为理解和掌握 OpenAttributeGraph 提供了很好的参考。
我一直想要的 Swift Android 开发环境 (The Swift Android Setup I Always Wanted)
Swift 6 引入了对 Android NDK 的官方支持,解决了长期以来在 Android 平台使用 Swift 的最大障碍。开发者现在可以直接 import Android,无需再手动处理头文件。Mikhail Isaev 在本文中展示了如何借助 JNIKit 在 Android 上优雅地使用 Swift,并详细讲解了通过 VSCode + Dev Containers + Swift Stream IDE 快速搭建 Swift Android 项目,配置完成后可自动拉取 Docker 镜像与工具链并生成 Gradle 工程的完整流程。
JNIKit 将繁琐的 JNI C API 封装为 Swifty 接口,大幅简化了 Swift 与 JVM 的交互,包括类加载、对象缓存和跨线程环境绑定。
SwiftUI 重绘机制深度解析 (SwiftUI Redraw System In Depth: Attributes, Recomputation, Diffing and Observation)
在 SwiftUI 中,优化应用性能的关键之一是减少不必要的视图重绘。然而,由于这涉及状态管理、依赖关系、视图比较等诸多机制,即便 SwiftUI 已经发布多年,依然有许多开发者理解不足。在本文中,Mathis Gaignet 将 SwiftUI 的重绘过程拆解为「属性 → 重算 → diffing → 观察」四个层次,并结合 Self._printChanges()
、Instruments 的 Effect Graph、Core Animation 等工具,通过大量实验展示了不同视图声明方式对性能的实际影响。
工具
Swift-Build GitHub Action
为 Swift 项目配置跨平台 CI/CD 向来不是一件轻松的事。Leo G Dion 开源的 swift-build GitHub Action 让这一切变得简单:只需几行配置即可在 macOS 和 Linux 上运行 Swift Package Manager 的构建与测试,同时内置智能缓存策略,大幅提升 CI 效率。想深入了解其工作原理,可以阅读作者的这篇详细介绍。
该 Action 已在 GitHub Marketplace 上架,可直接添加到工作流中使用,完全免费。
AppKitUI
许多 macOS 开发者仍在使用 AppKit,但又羡慕 SwiftUI 的声明式语法和数据绑定机制。Darren Ford 开发的 AppKitUI 巧妙地填补了这个空白:它为 AppKit 控件提供了类 SwiftUI 的链式语法、数据绑定和布局系统,让你无需 XIB 文件就能构建复杂的 NSView 界面,甚至支持在 Xcode Preview 中实时预览。该库兼容至 macOS 10.13,特别适合那些需要支持旧版系统但又想享受现代开发体验的项目。