skills/macos/appkit-swiftui-bridge/SKILL.md
Expert guidance for hybrid AppKit-SwiftUI development. Covers NSViewRepresentable, hosting controllers, and state management between frameworks. Use when bridging AppKit and SwiftUI.
npx skillsauth add rshankras/claude-code-apple-skills appkit-swiftui-bridgeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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:
dismantleNSView empty leaks KVO observations and NotificationCenter observersframe directly in makeNSView is ignored by SwiftUI's layout system — use sizeThatFits or intrinsicContentSize instead// 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
}
Load these modules as needed:
NSViewRepresentable: nsviewrepresentable.md
Hosting Controllers: hosting-controllers.md
State Management: state-management.md
development
US web checkout via the StoreKit External Purchase Link entitlement — currently 0% Apple commission (litigation ongoing), how to ship it safely, and how to architect for a commission flip so a future ruling is a config change, not a rewrite. Use when adding external purchase links, weighing web checkout vs IAP, or planning US-storefront pricing strategy.
tools
Revenue beyond the single-app price tag — own-app bundles, Family Sharing as a conversion lever, cross-developer bundles & suites, and institutional licensing via Group Purchases / Apple School & Business Manager. Use when a developer has multiple apps, a subscription worth sharing, complementary indie partners, or school/clinic/business buyers.
testing
Run a structured accessibility audit on an iOS/macOS app — automated XCUITest audits, Accessibility Inspector, manual VoiceOver/Dynamic Type passes, and App Store Accessibility Nutrition Label evaluation. Use before release, when preparing Nutrition Label declarations, or for EU Accessibility Act compliance.
tools
Stage-by-stage audit of an app's App Store growth machinery against a 54-item P0–P9 playbook — every item scored from an App Store Connect MCP call, a codebase check, or an explicit question to the user, then routed to the skill or command that fixes it. Read-only on App Store Connect. Use for a growth audit or scorecard, a pre-launch growth plan, a quarterly re-audit, or "which growth levers am I missing."