LogoAwesome Skills
  • Search
  • Category
  • Tag
  • Blog
LogoAwesome Skills
LogoAwesome Skills

Discover Open-Source Agent Skills for AI Coding Assistants

Product

  • Search
  • Category
  • Tag
  • Blog

Resources

  • Claude Skill Docs
  • Antigravity Skills Docs

Tools

  • Claude Code
  • OpenCode
  • Cursor
  • Codex
  • Antigravity

Company

  • Privacy Policy
  • Terms of Service
  • Sitemap

©2026 Awesome Skills. All rights reserved.

Privacy PolicyTerms
Back to Skills

swiftui-uikit-interop

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.

731stars39forksUpdated 6/12/2026
Developer Tools#ios#uihostingcontroller#uikit#swift#state-synchronization#swiftui

Security Assessment

Low Risk(80/100)

Detected risks:

Sensitive File Access([references/hosting-migration.md] .env, [SKILL.md] .env)
Security Score80/100

About swiftui-uikit-interop

The swiftui-uikit-interop skill helps developers bridge UIKit and SwiftUI in both directions, enabling incremental adoption of SwiftUI while continuing to use existing UIKit components. It addresses common integration challenges by providing patterns for wrapping UIKit views and view controllers so they can be used inside SwiftUI, as well as embedding SwiftUI views within UIKit-based applications. The skill focuses on state synchronization, lifecycle management, layout behavior, and communication across framework boundaries.

Its core capabilities include using UIViewRepresentable to expose UIKit views to SwiftUI, using UIViewControllerRepresentable to integrate UIKit view controllers, embedding SwiftUI content in UIKit through UIHostingController, and coordinating delegate-driven communication with the Coordinator pattern. The documentation also covers representable lifecycle methods such as makeUIView, updateUIView, makeCoordinator, dismantleUIView, and sizeThatFits, along with guidance for state synchronization, sizing and layout, Sendable considerations, common mistakes, review checklists, and migration patterns.

This skill is intended for iOS developers working with SwiftUI and UIKit applications. Typical use cases include integrating camera previews, map views, mail composition interfaces, document scanners, PDF rendering components, attributed-text editors, and third-party UIKit SDKs that do not have native SwiftUI equivalents. It is also useful for teams migrating large UIKit codebases to SwiftUI incrementally while maintaining compatibility with existing screens and architecture.

FAQ

When should I use UIViewRepresentable?

Use UIViewRepresentable when you need to wrap a UIKit UIView subclass so it can be displayed and managed within a SwiftUI view hierarchy.

How can SwiftUI content be embedded inside a UIKit application?

The skill covers embedding SwiftUI views in UIKit using UIHostingController, allowing SwiftUI screens to be integrated into existing UIKit-based apps.

What is the purpose of the Coordinator pattern?

The Coordinator pattern is used to manage delegate and datasource communication, helping synchronize events and state between UIKit components and SwiftUI.

Which iOS versions are targeted?

The documentation targets iOS 26+ with Swift 6.3 patterns and includes notes that are backward-compatible to iOS 16 unless otherwise specified.

What are the key lifecycle methods to understand when wrapping UIKit views?

Important lifecycle methods include makeCoordinator(), makeUIView(context:), updateUIView(_:context:), dismantleUIView(_:coordinator:), and sizeThatFits(_:uiView:context:) where supported.

All Files

3 files
references/hosting-migration.md17.2 KB
View
references/representable-recipes.md30.7 KB
View
SKILL.md18.2 KB
View

Install swiftui-uikit-interop

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill

Repository

dpearson2699/swift-ios-skills

Related Skills

dbt-sf-to-bq-translator

21,076

build-models

102

html-prototype

3,588

doc

448