How to Create Swift Macros: The Easiest and Least Boring Way

Tuesday, 10 June 2025

Originally published on the Trade Republic Engineering Blog.

The second part of the Swift Macros series. Learn how to create your own macro from scratch using TDD and SwiftSyntax. At Trade Republic, we built a macro library for mocks that cut down over 18,000 lines of code in the first few commits alone. This article walks you through the entire process, from bootstrapping a package to building a complete @Initify macro.

Continue reading on the Trade Republic Engineering Blog →

Reellette: When a Side Project Gets Real »