Multiple iOS Apps from a Single Codebase
Article Summary
David Phan from DoorDash reveals how they rebuilt two distinctly branded iOS apps from a single codebase after acquiring Caviar. The result? 90% shared code with completely different user experiences.
When DoorDash acquired Caviar in 2019, they faced a critical decision: maintain separate tech stacks or rebuild both apps on a unified platform. They chose the harder path, creating a scalable architecture that could support multiple branded experiences while maximizing code reuse and team velocity.
Key Takeaways
- 90% code sharing between DoorDash and Caviar apps with distinct branding
- Static library approach beat separate targets and build configurations
- Design Language System eliminated if-else theming with semantic UI abstractions
- Protocol-based dependency injection enables brand-specific feature customization
- Architecture now supports future business lines without codebase fragmentation
DoorDash built a single iOS codebase that powers two completely different branded apps, sharing 90% of code while maintaining distinct user experiences through semantic theming and protocol-based customization.
About This Article
When DoorDash acquired Caviar in 2019, they faced a challenge: integrate the Caviar iOS app into their platform while keeping separate binaries and distinct user experiences. The existing DoorDash consumer iOS team couldn't be disrupted in the process.
David Phan's team extracted the DoorDash app into a static library called CommonApp. They then built two thin app wrapper targets, one for Caviar and one for DoorDash. Brand-specific implementations were injected through protocols and dependency injection.
This architecture was simpler than using separate build targets or configurations. It let future business lines launch from the same codebase without splitting the platform or creating duplicate maintenance work.