# Expo Native Module Bridges

> Implement or debug JavaScript-to-native argument handling in Expo Modules. Use when Swift Function or AsyncFunction calls fail before reaching the native API, especially with raw dictionaries, numeric values, swallowed promise rejections, or stale native builds.

- Skill: `eho/expo-native-module-bridges` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add eho/expo-native-module-bridges`
- Raw SKILL.md: https://api.skillmd.com/api/skills/eho/expo-native-module-bridges/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Integrations & APIs
- Author: eho (https://skillmd.com/u/eho)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/eho/expo-native-module-bridges

---


# Expo Native Module Bridges

Prefer typed Expo arguments or `Record` types over raw `[String: Any]`
dictionaries.

Remember that JavaScript numbers arrive through Expo's JSI bridge as Swift
`Double`. A raw `as? Int` cast can therefore reject a valid JavaScript integer
before the platform API is called. When an exact integer is required, validate
that the `Double` is finite, integral, and in range before converting it.

Test bridge-facing parsers with realistic `Double` fixtures, plus malformed,
non-finite, and boundary inputs. Ensure rejected `AsyncFunction` promises are
surfaced by the JavaScript caller.

After changing native Swift or module definitions, rebuild and reinstall the
native app. When diagnosis is ambiguous, compare the bridge path with a
known-good native control path that exercises the same platform capability.

