DoorDash David Phan Mar 2, 2021

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

Critical Insight

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.

The article includes detailed code examples showing exactly how they abstracted colors, typography, and entire view controllers to work across brands without conditional logic.

About This Article

Problem

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.

Solution

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.

Impact

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.