Unlocking SwiftUI at Airbnb
Article Summary
Airbnb just replaced their entire iOS UI framework with SwiftUI. Here's how they pulled off a multi-million line codebase migration without breaking production.
Airbnb's iOS team spent years building Epoxy, their custom declarative UI framework on top of UIKit. But when SwiftUI matured, they made the bold decision to migrate. This is their playbook for adopting SwiftUI at scale across 500+ views and 200+ screens.
Key Takeaways
- Reduced code by 6x: review card went from 1,121 lines to just 174 lines
- 77% of engineers report SwiftUI improved their efficiency after adoption
- Built flexible styling system allowing custom component variants in dozens of lines
- Created bidirectional bridges between SwiftUI and existing Epoxy/UIKit code
- Ran half-week workshops that boosted team SwiftUI confidence by 37-39%
Airbnb successfully migrated to SwiftUI through phased adoption, design system rebuilds, and education investments while maintaining performance and quality.
About This Article
Airbnb's iOS team had thousands of screens built with UIKit and their Epoxy framework. They wanted to start using SwiftUI for new features, but rewriting everything at once wasn't realistic.
Bryn Bodayle's team created two-way bridges between the frameworks. They built an itemModel view modifier that wraps SwiftUI views in UIHostingController so they work in Epoxy lists. They also added a UIViewRepresentable extension that lets UIKit components render in SwiftUI, with proper layout support for complex views like UILabel.
By September 2023, engineers had adopted SwiftUI across 500+ views and 200+ screens at their own pace. Many of Airbnb's 2023 Summer Release features now run on SwiftUI while still working with the existing Epoxy infrastructure.