Dev Setup Guide
This guide explains how to getrevyl dev working for each supported framework. Pick your stack, follow the quick start, and refer to the subsections if you hit an edge case.
| Framework | Hot Reload Status | Provider Name |
|---|---|---|
| Expo | Fully supported | expo |
| React Native (bare) | Fully supported | react-native |
| Swift/iOS | Detection only (coming soon) | swift |
| Android Native | Detection only (coming soon) | android |
Expo
Quick start
How detection works
The CLI looks for two things in the current directory:"expo"inpackage.jsondependencies or devDependencies- At least one project indicator:
app.json,app.config.js,app.config.ts,eas.json, or.expo/directory
URL schemes
Hot reload deep-links the dev client to your local Metro server via a custom URL scheme:myapp://) registered in the dev client binary.
Where to find your scheme
Checkapp.json under expo.scheme:
app.config.js / app.config.ts:
revyl init and stores it as hotreload.providers.expo.app_scheme in .revyl/config.yaml.
Why universal links don’t work
Apps that only use universal links (https://example.com/...) for deep linking cannot use those for hot reload. Apple’s associated domains system requires a live HTTPS domain serving an apple-app-site-association file. Cloudflare tunnels generate random URLs that change every session, so the domain association never validates. Custom URL schemes (myapp://) bypass this entirely — no server verification needed.
No URL scheme in the app
If your app has noexpo.scheme (common in apps that only use universal links), you need to add one. The name is arbitrary and only affects the dev client:
app_scheme: myapp-dev in .revyl/config.yaml.
Checking existing schemes without rebuilding
The dev client may already have a scheme registered byexpo-dev-client. Check the iOS build:
exp+myslug, you can use that scheme in your config without rebuilding.
The use_exp_prefix option
Expo dev clients can register URL schemes in two formats:
- Base scheme:
myapp://— registered whenexpo.schemeis set in app.json - Prefixed scheme:
exp+myapp://— auto-registered byexpo-dev-clientbased on the app slug
use_exp_prefix in your config:
expo.scheme field in app.json defines the base scheme, but whether expo-dev-client also registers exp+<scheme>:// depends on the Expo SDK version and the addGeneratedScheme setting at build time. Since there’s no way to query this at runtime, the config toggle is the escape hatch.
Monorepo setup
In monorepos (Turborepo, Nx, pnpm workspaces), the Expo app typically lives in a subdirectory likeapps/native/, apps/mobile/, or packages/app/.
Run from the Expo app directory
All Revyl commands must run from the directory containing the Expo app’spackage.json — not the monorepo root.
FindRepoRoot, which walks up from the current directory looking for .revyl/. If the monorepo root also has a .revyl/ directory (common for CI test configs), make sure you’re in the correct subdirectory.
Why detection fails in monorepos
Two things go wrong:-
Hoisted dependencies — Package managers like pnpm, Yarn, and npm may hoist
expoto the rootnode_modules/or useworkspace:*protocol in the localpackage.json. The Expo provider reads the localpackage.jsonand checks for"expo"independenciesordevDependencies. If it’s not there, the provider returns nil (no match). -
Native directories match other providers — Every Expo project with prebuild has
ios/containing.xcodeprojfiles (triggering the Swift provider at confidence 0.7) andandroid/containingbuild.gradle(triggering the Android provider at confidence 0.6). When the Expo provider returns nil, these become the top matches.
revyl init detects “Swift/iOS (coming soon)” and “Android (coming soon)” instead of Expo.
Fix: Use --provider expo to bypass auto-detection:
expo is genuinely missing from the local package.json, add it:
Example config for a monorepo app
What to expect when the deep link opens
Afterrevyl dev starts, the CLI opens a deep link to connect the dev client to your local Metro server. You may notice:
- A confirmation dialog — iOS shows “Open in [Your App]?” with Cancel and Open buttons. This is a standard iOS security prompt for URL scheme handoffs. Tap Open to proceed. (On cloud simulators this currently requires a manual tap; future CLI versions will auto-accept it.)
- The app briefly restarts — The dev client may close and reopen as it disconnects from its cached state and reconnects to the tunnel URL. This looks jarring but is normal Expo dev client behavior. The app is reloading to fetch the JS bundle from your local Metro server instead of its built-in bundle.
- Sometimes no restart at all — If the dev client is already in a fresh state (first launch after install), it may connect seamlessly without closing. The behavior varies by Expo SDK version and whether the app was previously running.
Dynamic config (app.config.js / app.config.ts)
The CLI reads the URL scheme fromapp.json at expo.scheme. If the project uses app.config.js or app.config.ts instead, the CLI cannot auto-detect the scheme because evaluating arbitrary JavaScript is out of scope.
Provide the scheme explicitly during init:
.revyl/config.yaml after init:
Pre-built artifacts
If you already have a dev client build on disk (from EAS, CI, or a local build), skip the build step:.app zipped), not device builds (.ipa). Your EAS development profile must set ios.simulator: true.
Custom dev server port
If Metro runs on a non-default port (common in monorepos with multiple Metro instances), set it in config or as a flag:React Native (bare)
Quick start
How detection works
The CLI looks forreact-native in package.json dependencies without expo also being present. If both react-native and expo exist, the Expo provider takes precedence.
Detection confidence is 0.8 — higher than Swift (0.7) and Android (0.6), so bare RN projects are correctly identified even when ios/ and android/ directories are present.
Additional indicators that boost detection: metro.config.js, metro.config.ts, react-native.config.js, react-native.config.ts.
No app_scheme needed
Unlike Expo, bare React Native hot reload does not use deep links. The dev client loads the JavaScript bundle directly from the tunnel URL. Noapp_scheme or use_exp_prefix configuration is needed.
Monorepo considerations
The same directory rules apply as Expo:- Run all commands from the React Native app directory, not the monorepo root
- If
react-nativeis hoisted, use--provider react-nativeto force detection - Watch for multiple
.revyl/directories in the monorepo
Swift/iOS (coming soon)
The Swift provider detects native iOS projects by looking for.xcodeproj, .xcworkspace, Swift source files, or Package.swift. Detection works today (confidence 0.7), but hot reload setup is not yet supported.
Future implementation will use InjectionIII for hot reload.
If your project is incorrectly detected as Swift when it’s actually Expo or React Native (common in monorepos), use --provider expo or --provider react-native to override.
Android Native (coming soon)
The Android provider detects native Android projects by looking forandroid/build.gradle, android/build.gradle.kts, or AndroidManifest.xml. Detection works today (confidence 0.6), but hot reload setup is not yet supported.
If your project is incorrectly detected as Android Native when it’s actually Expo or React Native, use --provider expo or --provider react-native to override.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| ”Detected Swift/iOS instead of Expo” | Monorepo: ios/ triggers Swift provider; expo not in local package.json | revyl init --provider expo |
| ”Detected Android instead of Expo” | Monorepo: android/ triggers Android provider | revyl init --provider expo |
| ”No providers detected” | Missing package.json, wrong directory, or no framework indicators | cd to the app directory; verify package.json has expo or react-native |
| ”App scheme empty” | Using app.config.js instead of app.json | --hotreload-app-scheme myapp or edit config |
| ”Hot reload is not configured” | hotreload: section missing from config | Re-run revyl init --provider expo or add manually |
| ”Port 8081 is already in use” | Another Metro instance running | lsof -ti:8081 | xargs kill or --port 8082 |
| ”No application is registered to handle this URL scheme” | Dev client doesn’t have the scheme registered | Toggle use_exp_prefix: true/false in config; if neither works, add scheme to app.json and rebuild |
| No URL scheme in the app | App only uses universal links | Add "scheme": "myapp-dev" to app.json, rebuild dev client |
| ”Build platform ‘ios-dev’ not found” | build.platforms.ios-dev missing from config | Add it with the app_id from revyl build upload output |
Deep link fails with LSApplicationWorkspaceErrorDomain error 115 | The URL scheme in the deep link doesn’t match any installed app | Same as “No application is registered” above |
| App closes briefly after tapping “Open” in the dialog | Normal: dev client is reloading to connect to Metro via tunnel | Wait for it to reopen; if it doesn’t, check Metro output for JS errors |
| ”Open in [App Name]?” confirmation dialog | iOS system prompt for URL scheme handoffs | Tap “Open” to proceed; this is expected behavior |
Older CLI versions (v0.1.11 and earlier)
If--provider is not recognized, add the hotreload config manually:
- Run
revyl init(without--provider) - Open
.revyl/config.yaml - Add the
hotreload:section (see the Expo or React Native examples above) - Set
app_schemeto the value fromapp.json>expo.scheme - Run
revyl dev --platform ios
What’s next
- Dev Loop workflow — running tests in dev mode
- Agent Prompt Pack — copy-paste prompt templates for coding agents