What problem does it solve?
This Skill enables developers to bridge the gap between AppKit and SwiftUI, allowing for the use of powerful AppKit components within modern SwiftUI applications and vice-versa, especially when SwiftUI lacks a direct equivalent.
Core Features & Use Cases
- AppKit in SwiftUI: Use
NSViewRepresentable to embed AppKit views (like custom controls or legacy components) into your SwiftUI views.
- SwiftUI in AppKit: Use
NSHostingView or NSHostingController to host SwiftUI views within an AppKit application, facilitating gradual migration or feature integration.
- Advanced UI Elements: Implement features like floating panels (
NSPanel), popovers (NSPopover), and menu bar items (NSStatusItem) by leveraging AppKit's capabilities.
- Event Handling: Integrate global and local event monitoring using
NSEvent for system-wide or application-specific event detection.
Quick Start
Use the appkit-bridge skill to create a floating panel in your macOS app that hosts a SwiftUI view.