appkit-bridge
Installation
SKILL.md
AppKit Bridge — SwiftUI ↔ AppKit Integration
Critical Constraints
- ❌ DO NOT use
NSViewControlleras app architecture → ✅ Use SwiftUIApp+Scene, bridge only where needed - ❌ DO NOT use
NSViewsubclass when SwiftUI modifier exists → ✅ Check SwiftUI first, bridge as last resort - ❌ DO NOT forget
makeCoordinator()for delegate callbacks → ✅ Use Coordinator pattern for NSViewRepresentable - ❌ DO NOT call
makeNSViewto update → ✅ UseupdateNSView(_:context:)for state changes
NSViewRepresentable (AppKit → SwiftUI)
import SwiftUI
import AppKit
struct WrappedNSView: NSViewRepresentable {
var text: String