
Swiftui Uikit Interop
A practical reference for moving between SwiftUI and UIKit when you need camera controllers, document scanners, attributed text, or any of the hundred UIKit components still missing native SwiftUI equivalents. The guide walks through UIViewRepresentable and UIViewControllerRepresentable with clear lifecycle tables showing when makeUIView versus updateUIView fires, plus coordinator patterns for delegate callbacks. Targets iOS 26 with Swift 6.3 but notes backward compatibility to iOS 16. Most valuable for the state synchronization patterns and the common mistakes section, since getting binding updates to flow correctly across the framework boundary is where most interop bugs live. Good for incremental migrations or just wrapping that one UIKit view you can't replace yet.
- skills.sh installs
- 4.2K
- GitHub stars
- 1.3K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add dpearson2699/swift-ios-skills --skill swiftui-uikit-interop --agent claude-codeInstalls into .claude/skills of the current project.
Files
SwiftUI-UIKit Interop
Bridge UIKit and SwiftUI in both directions: wrap UIKit views and controllers, embed SwiftUI in UIKit screens, and synchronize state without duplicating lifecycle ownership.
See references/representable-recipes.md for complete wrapping recipes and references/hosting-migration.md for UIKit-to-SwiftUI migration patterns.
Contents
- UIViewRepresentable Protocol
- UIViewControllerRepresentable Protocol
- The Coordinator Pattern
- UIHostingController
- Sizing and Layout
- State Synchronization Patterns
- UIKit Automatic Observation Tracking
- Sendable Considerations
- Common Mistakes
- Review Checklist
- References
UIViewRepresentable Protocol
Use UIViewRepresentable to wrap any UIView subclass for use in SwiftUI.
Required Methods
Sponsors
Details
- Repository
- github.com/dpearson2699/swift-ios-skills
- Categories
- AI & Agent Building, Mobile Development, Office & Documents
- First seen
- Apr 16, 2026
More from dpearson2699/swift-ios-skills
All 98- Storekit4.2K
- Widgetkit4.2K
- Swiftui Gestures4.2K
- Apple On Device Ai4.2K
- Swift Charts4.2K
- Swift Language4.1K
- App Intents4.1K
- Authentication4.1K
- Background Processing4.1K
- Healthkit4K
- Vision Framework4K
- Coreml3.9K
- Core Bluetooth3.9K
- Core Motion3.8K
- Natural Language3.8K
- Speech Recognition3.8K
- Device Integrity3.8K
- Contacts Framework3.8K
- Alarmkit3.8K
- Core Nfc3.8K
- Swift Codable3.8K
- Tipkit3.8K
- App Clips3.8K
- Permissionkit3.7K