convez.ai
Skill
SwiftyJourney

swiftui-uikit-interop-skill

SwiftyJourney/swiftui-uikit-interop-skill

Ver no GitHub
InicialPluginScore · de 0 a 100

Bridge SwiftUI and UIKit: UIHostingController, representables + coordinators, cells, widgets, and lifecycle migration - Agent Skill

Instalação

$npx convez-ai SwiftyJourney/swiftui-uikit-interop-skill

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
1
Forks
0
Acompanhando
0
Saúde
50%
Último commit
há 3 meses
Versão
—
Issues abertas
0
Contribuidores
1

README

A tradução para o português deste README ainda está na fila.

SwiftUI ⇄ UIKit Interop Agent Skill

License: MIT Agent Skills

A Claude Code skill for the boundary between SwiftUI and UIKit — embedding SwiftUI in a UIKit app, wrapping UIKit views/controllers for use in SwiftUI, passing data across the divide, and migrating a UIKit app to the SwiftUI lifecycle.

Who is this for?

iOS developers integrating the two frameworks in a real codebase:

  • Showing or embedding a SwiftUI screen from UIKit (UIHostingController)
  • Putting SwiftUI inside UICollectionView/UITableView cells (UIHostingConfiguration)
  • Wrapping a UIKit view or view controller for SwiftUI (UIViewRepresentable / UIViewControllerRepresentable + Coordinator)
  • Passing data and events across the boundary (init params, @Binding, closures, environment/trait forwarding)
  • Fixing hosting-controller sizing and Auto Layout conflicts
  • Migrating a UIKit AppDelegate/SceneDelegate app incrementally to the SwiftUI App lifecycle
  • Building SwiftUI widgets and Live Activities

Installation

Install via skills.sh:

npx skills add SwiftyJourney/swiftui-uikit-interop-skill

Compatible Agents

What the Skill Covers

DirectionTools
SwiftUI in UIKitUIHostingController (present, child-embed, subclass, sizing), UIHostingConfiguration cells
UIKit in SwiftUIUIViewRepresentable, UIViewControllerRepresentable, the Coordinator pattern
Across the boundaryinit params, @Binding, closures, environment/trait forwarding, observation
ExtensionsSwiftUI in WidgetKit widgets and Live Activities
MigrationUIKit lifecycle → SwiftUI App lifecycle, incrementally

Skill File Structure

SKILL.md                              # Hub: behavior contract, diagnostic table, reference router
references/
├── hosting-controller.md             # UIHostingController: present, child-embed, subclass, sizing
├── hosting-configuration.md          # UIHostingConfiguration for collection/table cells (iOS 16+)
├── representables.md                 # UIViewRepresentable, UIViewControllerRepresentable, Coordinator
├── passing-data-across-the-boundary.md  # init params, @Binding, closures, environment/trait forwarding
├── widgets-and-live-activities.md    # SwiftUI in WidgetKit widgets and Live Activities
└── lifecycle-migration.md            # UIKit AppDelegate/SceneDelegate → SwiftUI App lifecycle

Related Skills

  • SwiftUI Expert — SwiftUI view code: state, composition, performance, animations, accessibility
  • iOS Architecture Expert — Clean modular architecture: composition root, protocol boundaries, generic presenters, Swift 6 concurrency
  • Requirements Engineering — Turn vague requirements into testable specs: BDD, use cases, contracts, diagrams
  • Swift Language Expert — Non-obvious Swift language & standard-library techniques

Credits

  • Natalia Panferova (Nil Coalescing) — "Integrating SwiftUI into UIKit Apps", which informed the interop patterns distilled here
  • Apple — SwiftUI / UIKit documentation, WWDC sessions, and Human Interface Guidelines

License

MIT — see LICENSE.

Ver o original no GitHub

Bom para

Relacionados