SwiftUI Swift Macros
Custom @Environment Values Used to Need Five Lines of Boilerplate. Now They Need One.
The @Entry macro replaces the EnvironmentKey struct, defaultValue, and extension boilerplate every custom SwiftUI environment value needed — but it changes a couple of defaults you should know about before you migrate.
5 min read
Swift Swift Macros
Custom Swift Macros: When They're Actually Worth the Build-Time Cost
Day 29 of the 30-day iOS series. The difference between @freestanding and @attached macros, why most macro ideas are over-engineering traps, and a real #URL macro — built TDD-first as a standalone Swift package — that catches BrewLog's force-unwrapped base URL at compile time instead of runtime.
9 min read