What problem does it solve?
Bridges UIKit and SwiftUI by wrapping UIKit views and view controllers in SwiftUI with UIViewRepresentable and UIViewControllerRepresentable, embedding SwiftUI in UIKit with UIHostingController, and coordinating delegate callbacks. Use when integrating camera previews, map views, mail compose, document scanners, PDF renderers, text views with attributed text, or other UIKit-only or third-party UIKit SDK surfaces into a SwiftUI app, or when migrating a UIKit app to SwiftUI incrementally.
Core Features & Use Cases
- Wrap UIKit views with UIViewRepresentable for use in SwiftUI.
- Wrap UIKit view controllers with UIViewControllerRepresentable for modal and navigation flows.
- Embed SwiftUI inside UIKit using UIHostingController and coordinate delegates with a Coordinator.
- Use Case: incremental migration of a UIKit app to SwiftUI while preserving behavior and state.
Quick Start
Create a SwiftUI wrapper by implementing UIViewRepresentable for your UIKit view and embed SwiftUI in UIKit with UIHostingController, wiring a Coordinator to handle delegate callbacks.