Challenges of mixed SwiftUI and UIKit codebases in iOS Apps
Article Summary
Medium's iOS team has been wrestling with a codebase dating back to 2013. Migrating from UIKit to SwiftUI? It's messier than you think.
Alla Dubovska from Medium's iOS team shares hard-won lessons from integrating SwiftUI into a legacy UIKit app. This isn't a theoretical discussion—it's a field report from the trenches of production code.
Key Takeaways
- Cell sizing in mixed environments often requires building components twice
- SwiftUI TextField still doesn't meet Medium's needs despite iOS 16+ support
- View debugger shows degraded flat layers compared to UIKit's clarity
- Scroll offset values are inverted: negative in UIKit, positive in SwiftUI
- Performance issues resolved by migrating from UILabel to native SwiftUI Text
Critical Insight
Mixing SwiftUI and UIKit creates real technical debt through code duplication, debugging challenges, and navigation complexity that teams must weigh carefully.