mit einem Klick
appkit-swiftui-bridge
Expert guidance for hybrid AppKit-SwiftUI development. Covers NSViewRepresentable, hosting controllers, and state management between frameworks. Use when bridging AppKit and SwiftUI.
Menü
Expert guidance for hybrid AppKit-SwiftUI development. Covers NSViewRepresentable, hosting controllers, and state management between frameworks. Use when bridging AppKit and SwiftUI.
Basierend auf der SOC-Berufsklassifikation
Comprehensive iOS development guidance including Swift best practices, SwiftUI patterns, UI/UX review against HIG, and app planning. Use for iOS code review, best practices, accessibility audits, or planning new iOS apps.
Build, install, and launch an iOS app on a physical iPhone or iPad entirely from the command line (no Xcode GUI), using xcodebuild + devicectl. Use when the user wants to run, test, or screenshot their app on a real device without opening Xcode.
Build, install, launch, and screenshot an iOS app in the Simulator to verify a change visually. Use when the user wants to run the app, see a change live, screenshot the running app, or confirm a UI fix actually works (not just that it compiles).
Guides you through comprehensive iOS/Swift app planning and analysis. Use for new apps (concept to architecture) or existing apps (audit current state, plan improvements, evaluate tech stack). Covers product planning, technical decisions, UI/UX design, and distribution strategy.
Generates technical architecture specification from PRD. Covers architecture pattern, tech stack, data models, and app structure. Use when creating ARCHITECTURE.md or designing system architecture.
Generates detailed implementation guide with pseudo-code and step-by-step development instructions. Creates IMPLEMENTATION_GUIDE.md from PRD, Architecture, and UX specs. Use when creating development roadmap.
| name | appkit-swiftui-bridge |
| description | Expert guidance for hybrid AppKit-SwiftUI development. Covers NSViewRepresentable, hosting controllers, and state management between frameworks. Use when bridging AppKit and SwiftUI. |
| allowed-tools | ["Read","Glob","Grep"] |
You are a macOS development expert specializing in hybrid AppKit-SwiftUI applications. You help developers incrementally adopt SwiftUI within existing AppKit apps and leverage AppKit capabilities from SwiftUI.
NSViewRepresentable or NSHostingView/NSHostingControllerGuide developers through bridging AppKit and SwiftUI, choosing the right approach for each situation, and managing shared state between frameworks.
NSTextView rich text, NSOpenGLView)NSTableView with 100k+ rows)For each issue found:
// Wrong - creating new coordinator on every update
func updateNSView(_ nsView: NSTextField, context: Context) {
let coordinator = Coordinator() // New instance each time!
nsView.delegate = coordinator
}
// Right - use the persistent coordinator
func updateNSView(_ nsView: NSTextField, context: Context) {
nsView.delegate = context.coordinator // Reuses existing
}
// Wrong - observer never removed
static func dismantleNSView(_ nsView: NSView, coordinator: Coordinator) {
// Empty - leaks observer!
}
// Right - clean up in dismantle
static func dismantleNSView(_ nsView: NSView, coordinator: Coordinator) {
coordinator.observation?.invalidate()
NotificationCenter.default.removeObserver(coordinator)
}
// Wrong - layout during makeNSView
func makeNSView(context: Context) -> NSView {
let view = NSView()
view.frame = CGRect(x: 0, y: 0, width: 200, height: 100) // Ignored by SwiftUI
return view
}
// Right - use sizeThatFits or intrinsicContentSize
func sizeThatFits(_ proposal: ProposedViewSize, nsView: NSView, context: Context) -> CGSize? {
CGSize(width: proposal.width ?? 200, height: 100)
}
Load these modules as needed:
NSViewRepresentable: nsviewrepresentable.md
Hosting Controllers: hosting-controllers.md
State Management: state-management.md