Evolution of the Medium iOS app architecture
Article Summary
Medium's iOS team ditched their monolith for Swift packages and SwiftUI. A year later, they're shipping features faster than ever.
Thomas Ricouard from Medium Engineering shares how they transitioned from a monolithic iOS architecture to a package-based system. This follow-up details what worked, what didn't, and how the team structures features today.
Key Takeaways
- Split codebase into Model and Features packages with independent library products
- Created Env for dependency injection and Navigator for cross-package navigation
- GraphQL queries live with features, not in shared code layer
- SwiftUI previews plus packages enable rapid iteration with design feedback
- iOS 14/15 SwiftUI differences require heavy testing and occasional tradeoffs
Medium's modular architecture with Swift packages and SwiftUI dramatically improved iteration speed, though the transition took over a year of incremental work.
About This Article
Medium's iOS codebase was monolithic, which made debugging tedious and slowed down how quickly teams could iterate on UI-heavy features. Everything was tightly coupled, so changes required coordination across multiple components.
Thomas Ricouard's team restructured the codebase by splitting it into Model and Features Swift packages. GraphQL queries and protocol extensions moved to the feature level instead of living in shared code.
Build and debug cycles got noticeably faster. The team could now swap out entire UI implementations in seconds using SwiftUI, whereas UIKit transitions used to take minutes.