OkCupid Apr 27, 2020

Choosing Between SwiftUI and UIKit

Article Summary

Joel from OkCupid's engineering team built the same login flow twice—once in SwiftUI, once in UIKit—to support millions of users across iOS versions. Here's what he learned about making them coexist.

When SwiftUI launched, OkCupid faced a dilemma: adopt the new framework without abandoning users on iOS 12 and older. Their solution? Build features side-by-side in both frameworks, sharing business logic while maintaining backwards compatibility. This deep dive covers the technical approach, shared view models, and hard-won lessons from production implementation.

Key Takeaways

Critical Insight

OkCupid successfully runs SwiftUI and UIKit side-by-side by sharing view models and business logic while duplicating only the UI layer, enabling gradual adoption without dropping older iOS support.

The article reveals a subtle SwiftUI bug with transitions that took two Stack Overflow answers to solve—and why placeholder text color became a philosophical debate.

Recent from OkCupid

Related Articles