Embracing SwiftUI: PhonePe's Journey Building ONDC-Powered Pincode
Article Summary
PhonePe's iOS team built their entire ONDC shopping app in SwiftUI when most considered it too risky for production. The result? 1M+ downloads and a blueprint for modern iOS development.
The Pincode iOS Team shares their journey building PhonePe's standalone shopping app using SwiftUI instead of UIKit. Launched in April 2023, this was a bold bet on Apple's declarative framework for a greenfield e-commerce product connecting users to local stores via India's ONDC network.
Key Takeaways
- Built custom navigation solution combining UIHostingViewController and UINavigationController to fix SwiftUI bugs
- MVVM with Combine proved superior to MV pattern for maintainability at scale
- Avoided nested LazyVStacks after discovering unexpected layout and performance issues
- Achieved 1M+ downloads across platforms within months of April 2023 launch
Critical Insight
PhonePe proved SwiftUI is production-ready by shipping a complete e-commerce app that hit 1M+ downloads, establishing a path for adopting it in their main 1.2M line codebase.