plugins/smedjen/skills/expo-swiftui/SKILL.md
SwiftUI integration with Expo modules — native iOS views, bridging patterns, and module API
npx skillsauth add hjemmesidekongen/ai expo-swiftuiInstall 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.
Expo Modules API is Swift-first. A Module subclass with a Definition() body exposes functions, constants, and views to JavaScript — no Objective-C bridging or .m files required.
Define the module, name it, and register any functions and views in definition(). The Name() call must match the string used in requireNativeModule() on the JS side.
Expo views subclass ExpoView (not UIView). To host a SwiftUI view, wrap it in a UIHostingController and add the hosting controller's view as a subview. Override layoutSubviews() to keep the hosted view's frame in sync with bounds.
Props are declared with Prop in the module Definition() and applied to the ExpoView subclass. Events use @EventDispatcher on the view class and are registered with Events() in the definition. Fire them by calling the dispatcher with a plain dictionary payload.
Call any iOS SDK directly from the module or view. APIs requiring permissions need a config plugin that adds the NSUsageDescription key to Info.plist — never edit Info.plist manually since expo prebuild regenerates it.
ExpoView lifecycle: didMoveToWindow(), willMove(toSuperview:), and SwiftUI .onAppear / .onDisappear inside the hosted view. Module-level lifecycle uses OnCreate and OnDestroy in the definition body.
To push native UIKit screens from within a module, access the root view controller via appContext?.utilities?.currentViewController(). Avoid doing this in props — use a module function that JS calls explicitly.
See references/process.md for full Swift module code, UIHostingController setup, config plugin patterns, testing native modules, debugging on-device, and anti-patterns.
development
Creates a brand from scratch through market research and interactive sparring. Runs competitive research via Perplexity, then guides the user through positioning, audience, voice, values, and content pillars. Produces the full brand guideline set at .ai/brand/{name}/. Use when building a new brand, defining brand strategy for a product, or when /våbenskjold:create is invoked.
testing
Loads brand guidelines from .ai/brand/{name}/ and makes them available to the current context. Progressive disclosure: L1 confirms brand exists, L2 loads summary, L3 loads specific files on demand. Use when a downstream skill or user needs brand context, or when /våbenskjold:apply is invoked.
documentation
Guided reinvention of an existing brand guideline. Loads current brand from .ai/brand/{name}/, identifies what to keep vs change, and walks the user through targeted evolution. Preserves brand equity while updating positioning, voice, or values. Use when refreshing a brand or when /våbenskjold:evolve is invoked.
development
Codifies an existing brand from materials, samples, and references. Analyzes provided content to extract voice patterns, values, and positioning. Produces the same guideline format as brand-strategy. Use when a brand already exists but isn't documented, or when /våbenskjold:audit is invoked.