Skip to main content
skill CX Codex

swiftui-uikit-interop — Claude Code skill: setup and overview

Bridges UIKit and SwiftUI views, controllers, and shared state without lifecycle conflicts or duplicated data.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add dpearson2699/swift-ios-skills --skill swiftui-uikit-interop -a claude-code
Open on GitHub

What swiftui-uikit-interop does

The skill equips coding agents with integration patterns between UIKit and SwiftUI. It covers UIViewRepresentable and UIViewControllerRepresentable implementations, explicit handling of updateUIView cycles, and teardown logic inside dismantleUIView. Custom sizing with sizeThatFits is also covered for iOS 16 and later.

The coordinator pattern receives focused attention because value-type SwiftUI structs cannot act as UIKit delegates directly. Storing references on a dedicated coordinator class lets delegate callbacks safely mutate parent @Binding properties. Without defensive checks in view updates, two-way state synchronization easily triggers infinite rendering loops.

What it helps with

  • wrap UIKit views in SwiftUI structs safely
  • present system view controllers using UIViewControllerRepresentable
  • route delegate callbacks back to SwiftUI bindings with a coordinator
  • configure custom view dimensions with sizeThatFits on iOS 16+

Example prompts for the agent

  • Wrap UITextView in a UIViewRepresentable with a two-way text binding.
  • Show how to present VNDocumentCameraViewController inside a SwiftUI sheet using a coordinator.
  • Add dismantleUIView to clean up active observers and subscriptions when the view leaves the hierarchy.

How to install swiftui-uikit-interop

1Skills CLI (Vercel)

npx skills add dpearson2699/swift-ios-skills --skill swiftui-uikit-interop -a claude-code

2Manually: put the files in place

~/.claude/skills/swiftui-uikit-interop/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/swiftui-uikit-interop/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about swiftui-uikit-interop

How do I install swiftui-uikit-interop in Claude Code?

Run npx skills add dpearson2699/swift-ios-skills --skill swiftui-uikit-interop -a claude-code in your terminal.

What does swiftui-uikit-interop do?

It provides architecture rules and lifecycle templates for embedding UIKit views into SwiftUI and synchronizing state between both frameworks.

Why is a coordinator needed for UIKit delegates?

SwiftUI view representations are value-type structs, whereas UIKit delegates require reference types. The coordinator holds the class instance that receives delegate callbacks and updates parent bindings.

Similar skills

Everything for Mobile →

From the same set69

swift-charts A skill that steers your coding agent through Swift Charts work on iOS 26+. Useful for bars, lines, donuts, heat maps and 3D surfaces. CX Codex +1 4,000installs widgetkit Skill for building and reviewing WidgetKit widgets and controls: timelines, configurable widgets, interactive buttons. Use it when your app needs a Home Screen or Lock Screen widget. CX Codex +1 4,000installs swiftui-gestures Guides gesture implementation in SwiftUI, from tap and drag recognition to multi-gesture composition and conflict handling. CX Codex +1 4,000installs storekit Guides your agent through StoreKit 2 in-app purchases and subscriptions: paywalls, transactions, entitlement checks. CX Codex +1 4,000installs background-processing Sets up iOS background execution using BGTaskScheduler, URLSession, and push triggers. Useful when you need feed updates or nightly database maintenance. CX Codex +1 3,900installs authentication Build iOS sign-in flows with Apple credentials, passkeys, OAuth and biometrics. Useful when an app needs credential-state handling and server-side token checks. CX Codex +1 3,900installs vision-framework A skill for adding text recognition, face detection and barcode scanning to iOS apps. Useful when you need OCR or live camera scanning. CX Codex +1 3,800installs healthkit This skill guides AI agents through reading, writing, and querying Apple Health data via HealthKit in Swift. Use it for workout flows, health metric charts, and background updates. CX Codex +1 3,900installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor