English Home | Fatbobman's Blog |肘子的 Swift 记事本 – Sharing content related to Swift, SwiftUI, Core Data, and Swift Data, as well as covering development tools, AI, and other topics. All articles are original creations; for reproduction, please contact the author.
In WWDC 2026, Apple engineers introduced a new SwiftUI feature — ContentBuilder. From the usage perspective, it seems to be nothing more than a ViewBuilder with a wider scope. Apple also claims this adjustment can significantly improve type-checking performance. This article will dissect the essence of ContentBuilder and explore the secrets behind the performance boost.
In July, Apple Intelligence appeared on the latest list of generative AI services registered with China’s Cyberspace Administration of China (CAC). Then, just two days ago, Apple confirmed that Alibaba’s Qwen would be involved in the Chinese version of Apple Intelligence, and the integration briefly appeared in Apple’s official documentation.
SwiftUI's Text has a default behavior: when the final line of a paragraph is left holding a single stranded word or character, it proactively pushes the complete word group from the preceding line down to join it, so that nothing is left standing alone. This bit of thoughtfulness is right most of the time, but it comes at a cost — the preceding line may be left with a wide gap. In narrow…
Recently, the temperatures in my city have been breaking historical records. Since the end of July, we've been stuck in a stretch of scorching weather lasting more than ten days, with temperatures consistently above 30°C. While that may not sound particularly extreme on its own, paired with humidity exceeding 80%, it leaves behind a lingering sense of heat that never quite goes away—even after…
Although Liquid Glass has been around for two years, the compatibility issues it introduced haven’t completely disappeared. Drawing on a real-world project, SLIT_STUDIO developer Megabits summarizes several common UIKit adaptation pitfalls and the solutions he used to address them.
Lately, even tasks that I consider relatively simple often take AI several minutes—or sometimes even tens of minutes—to complete. It gave me the impression that as models become more capable, they somehow have to become slower.
Over the past few months, I've been refining my own AI-assisted workflow. Real progress has been made, but for long-running tasks, I've consistently lacked any quantifiable benchmark data.
Recently, OpenAI’s Codex was found to have a logging issue: the program kept writing large volumes of logs to a local database, causing the files to grow continuously and generating far more disk writes than normal. Bugs like this are hardly new. A few years ago, most people would probably have deleted the files, restarted the app, and waited for the next release to fix it.
Easy-to-use animation has always been one of SwiftUI's defining features. But the nature of a declarative framework is a double-edged sword: once an animation misbehaves, tracking down the cause is often trickier than in an imperative framework. This post records two SwiftUI animation bugs I ran into over the past two weeks, along with how I tracked each of them down.
Starting with WWDC 26, when an iPhone app is mirrored to a Mac through iPhone Mirroring, its window can be freely resized. At the same time, iPhone-only apps running on iPad will also enter a resizable environment. Even without updating a physical device to a beta system, developers can already experience this change through Xcode 27 previews or the iOS 27 simulation environment in Device Hub.
The introduction of the Observation framework has refined SwiftUI’s state reactivity from the object level down to the property level, significantly reducing many unnecessary view computations caused by coarse-grained observation. I recently explored and implemented Observation support in Core Data Evolution, giving `NSManagedObject` property-level precise observation capabilities. This article…
The declarative expression of animation is one of SwiftUI's core strengths. But in some scenarios the result isn't always as smooth as we'd hope. A typical example: when the content height inside a `List` row changes dynamically — a subtitle going from empty to non-empty, or text changing its line count after an update — the system's built-in layout engine often fails to produce a continuous…
In my previous article, I discussed the current reality of Core Data in today's projects: it hasn't disappeared, and it still has unique value, but the disconnect between it and modern Swift projects is becoming increasingly apparent. In this article, I will introduce my experimental project Core Data Evolution, exploring whether we can make Core Data continue to exist in modern Swift projects in…
Core Data remains widely used in 2026, but its mismatch with modern Swift concurrency, type safety, and code expression is growing. This article outlines the three core pain points and explores what modernization might look like without abandoning Core Data.
This post documents a recent debugging journey: starting from a test failure, tracing all the way down to the Core Data SDK interface, and ultimately discovering that the key change had nothing to do with the Swift compiler itself — it was how NSManagedObjectContext is imported into Swift that had changed.
Assigning values to @State in init usually fails on updates. Discover the mechanics of SwiftUI View Identity and the correct data flow patterns to fix this common issue.
Did your GA4 events stop working after optimizing with Partytown? Learn how to configure the `forward` property in Astro to bridge `gtag` and `dataLayer.push` between the main thread and Web Workers.
Learn how to share code between multiple Targets within a Swift Package without exposing it publicly. We explore the `package` access modifier to bridge the gap between `internal` and `public`.
SwiftLint ignoring your root config in VSCode or Cursor? Learn how to set `configSearchPaths` and structure your Monorepo to share linting rules across multiple packages.
Core Data unit tests failing in VSCode or Cursor? Learn how to configure the Xcode toolchain and use `xcrun momc` to manually compile `.xcdatamodeld` files.