#10 - Jun 13, 2025
The hidden costs of static instances
Welcome to issue 10!
During a recent WWDC 2025 session, I caught something that made me pause: a test accessing a static shared instance. It reminded me how these seemingly innocent patterns become the silent killers of test parallelization. Here's the thing about tests—while some developers see them as productivity drains, they become indispensable as codebases and teams grow. A single change can cascade through your system in ways you'd never anticipate, surfacing as bugs that only comprehensive testing can catch. Manual testing simply can't cover the exponential complexity of mature products. The variability of scenarios increases exponentially as features multiply, making automated testing not just helpful, but essential. Most of us develop on Apple Silicon, which means multiple cores sitting there, ready to run tests in parallel. Add the fact that many tests spend time waiting for IO operations, and you've got a recipe for serious concurrency gains. In theory, your test suite should fly. But practice tells a different story. Swift isn't a pure functional language, which means shared state creeps in everywhere—often without you noticing. Those static shared instances I mentioned? They're perfect hiding spots for global state. Add some without thinking, increase parallelism, and watch your test suite become a flaky mess. Data races emerge. Debugging becomes a nightmare. I've yet to see a codebase that hasn't fallen into this trap, Tuist included. So you want faster tests through parallelism, but can't because shared state makes everything unreliable. Retries pile up. Your "optimized" test suite runs slower than before. The solution sounds simple: avoid shared state. Pass everything through function signatures. But that boilerplate adds up, and nobody wants to write it. This is where two recent Swift improvements change the game entirely. First, task locals let you propagate state down a tree of tasks without the ceremony of passing parameters everywhere. Think React context or SwiftUI's Environment, but for your test tasks. Each test gets its own isolated state bubble without the boilerplate overhead. Second, Swift Testing's custom traits turn state management into elegant annotations. Need a mocked environment? Add @Test(withMockedEnvironment) to your test. The state stays perfectly scoped to that test. This kind of scoping blew me away when I first encountered it at Elixir. I'm surprised it's not a bigger conversation in the Swift community. We're at a moment where test parallelization isn't just possible—it's essential. Pair it with our upcoming content-addressable store, and we're looking at build and test runs that aren't just fast, but rock-solid reliable. The tools are here. The question is whether we'll use them. The content has been written by a human and the grammar reviewed with Claude Sonnet 4
Tools & sites
Quarkdown
Markdown with superpowers
|
Did you ever have to do a presentation or a book and wish you could do it in Markdown? Quarkdown extends Markdown, providing you the tools to turn your writings into beautifully-formatted books or presentations.
|
line-numbers
A web component to add line numbers
|
Web components are the web-native solution to distribute reusable components like line-numbers, by the creator of 11ty. You can use it to add line numbers to your code blocks on your website.
|
Context7
Up-to-date documentation for LLMs and AI code editors
|
LLMs and AI code editors expect context to be in the form of text, but not all the programming languages and frameworks out there share their content in that way. Luckily, Context7 provides a directory of LLM-ready content from your favorite technologies, like Swift.
|
Grog
A build tool for monorepos
|
If you work on a monorepo and need a tool to declare and interact with a build graph that's agnostic of the underlying tools, you might want to check Grok out.
|
swift-erlang-actor-system
Erlang/Elixir integration for Swift Distributed Actors
|
It's not a secret that we are big fans of Elixir and Swift and their actor model, and we are excited to see this project, which bridges actors across languages.
|
Worthy Five: Daniel
Daniel is a core contributor to Fastlane and a big fan of all things Apple. He writes about iOS development on mollyiv.dev. In his free time, he enjoys running, watching anime, and picking up new skills.
|
An app worth installing:
Bear is my go-to note-taking app for capturing ideas and organizing my life. It features a clean, minimal design, beautiful themes, and excellent user experience. Flexible tags help me stay organized while capturing tons of notes and information.
An open-source project worth checking out:
swift-dependencies is the best solution for dependency injection on Apple platforms. The library is inspired by SwiftUI’s environment. One of its key strengths is its scoping mechanism, powered by task locals. The documentation is excellent; it not only shows how to use the library but also explains the core concepts behind dependency injection.
A developer tool worth using:
mise is a tool that helps me manage multiple versions of development tools on my system.
A developer worth following:
Point-Free is run by Brandon and Stephen, who will take your iOS development skills to a new level. The solutions they share are clever, elegant, and easy to understand. They’ve been producing high-quality content for years.
A book worth reading:
The Cat Who Taught Zen by James Norbury is a beautifully illustrated and thoughtful book. It explores core Zen principles like presence, acceptance, and letting go. It encourages you to slow down and reflect on your inner world.
|
Food for thought
Swift Packages: Packaging as an XCFramework
Read
|
With the removal of the workflow to get an Xcode project from a Swift Package, creating an XCFramework became a bit trickier. In this blog post, Thuyen shares how you can manually create an XCFramework using the artifacts built by SwiftPM.
|
Disclosure: Covert Web-to-App Tracking via Localhost on Android
Read
|
Did you know that Meta and Yandex rolled out a system that allowed their web SDK to get the user's identity by communicating with the app installed on the device, workarounding any browser built-in protections? This blog post goes into detail about how they made it possible.
|
Apple Design Award Finalist After 15 Years
Read
|
iA Writer became a finalist in the Apple Design Awards for the first time, and they share how impressive it is that a design that's not novel, but has sustained the test of time, has managed to be in that position.
|
Codex CLI is going native
Read through
|
OpenAI decided to re-implement their codex CLI from Node.js JavaScript to Rust for portability and performance reasons, among others. In this issue, they unfold the reasons behind the decision.
|
Swift-Syntax Prebuilts for Macros
|
After a lot of wasted build cycles, pre-built macros are finally coming to Apple's toolchain, so you won't have to compile the SwiftSyntax tree of dependencies anymore.
|
|