What problem does it solve?
Integrating UIKit-only views, view controllers, and delegate-driven SDKs into a SwiftUI app without losing state sync, layout correctness, or lifecycle safety.
Core Features & Use Cases
- Wrap UIKit views for SwiftUI with
UIViewRepresentable, including correct lifecycle handling via makeUIView and updateUIView, plus optional sizing with sizeThatFits.
- Wrap UIKit controllers for SwiftUI with
UIViewControllerRepresentable, capturing delegate callbacks using a Coordinator and routing results back through @Binding.
- Embed SwiftUI within UIKit using
UIHostingController (and optionally UIHostingConfiguration for iOS 16+ cell use), with correct containment and sizing.
- State and environment synchronization across the boundary using
@Binding, coordinator-driven updates, and SwiftUI context.environment (plus migration-focused references).
Quick Start
Use the swiftui-uikit-interop skill to design a UIViewRepresentable or UIViewControllerRepresentable wrapper for your UIKit component, wiring delegate callbacks back into SwiftUI with bindings and a Coordinator.