Repository navigation
v0.2.1 — React Native CLI apps, monorepos, Fast Refresh, telemetry
React Native CLI apps, monorepos and Fast Refresh, a sturdier tunnel download, and anonymous usage telemetry.
React Native CLI apps (#5)
native-sim was Expo-only. It now builds plain React Native CLI apps too — thanks @NikhilRW.
native-sim up --framework react-native --publicExpo stays the default. A React Native CLI project builds from its checked-in ios/
(Podfile and Xcode project) instead of expo prebuild, and up, init and doctor
validate the project for the framework you pick. On a Release cache hit, the bundle is
refreshed with react-native bundle rather than expo export:embed.
Monorepos — --project-dir
Run from the repository root and point at the app:
native-sim up --project-dir apps/mobile
native-sim up --framework react-native --project-dir apps/nativeThe workflow and auth gate live at the root, dependencies install from the root
lockfile (Bun, pnpm, Yarn or npm) so workspace packages resolve, and the framework
build, native cache and exported archive use the app directory.
Fast Refresh from your computer — --dev and --dev-url
--dev builds a Debug app that loads JavaScript from your local Metro instead of a
bundle. --dev-url points it at Metro directly:
- Expo: pass the development-client link from
npx expo start --dev-client --tunnel. - React Native CLI: pass a public HTTPS tunnel to Metro. The runner puts a Caddy
proxy on the simulator'slocalhost:8081that forwards to it.
The tunnel must be reachable from GitHub's runner; localhost and LAN URLs won't work.
Caching
Framework, app directory and Debug/Release are now part of the native build cache key,
so switching any of them can't restore the wrong build.
Tunnel download retries (#4)
The cloudflared download in the workflow had no retry, and GitHub Releases downloads
on macOS runners occasionally die mid-transfer (curl exit 56). That step runs after the
build, so one flaky download threw away a whole run. It now retries, including on
transport errors — thanks @hhwjsw711.
Telemetry
native-sim now sends anonymous usage stats, so we can see which commands and options
people actually use:
- the command, and whether it failed and after how long
- the flags passed.
--framework,--mode,--transport,--codec,--deviceand the
numeric options are sent by value; on/off flags as true/false; everything else
(--repo,--app,--app-file,--project-dir,--dev-url,--message, …) only
as "set", never by value - the native-sim version, OS, CPU architecture, Node version and whether it ran in CI
- a random ID created on first run in
~/.config/native-sim/telemetry.json
Nothing from your project, repository, GitHub account, credentials or stream is sent.
The first run prints a one-line notice. Opt out with DO_NOT_TRACK=1 or
NATIVE_SIM_TELEMETRY_DISABLED=1. Requests are capped at 1.5 seconds and never change a
command's output or exit code. Details in the README.
Upgrading
npm install -g native-sim@0.2.1
native-sim init # refreshes the workflow to template v210.2.1 supersedes 0.2.0, which shipped the telemetry without the changes above.
Full changelog: v0.1.1...v0.2.1