◉RORK LABJP
●PREVIEW — Since 11/24, the preview stays up while Rork rebuilds, so you can keep using the previous version●SONNET 4.5 — Sonnet 4.5 retires from the Claude API on 11/30, 5 days left. Check which model your AI features call●DOCKER — Expo users report the dev server exiting on a debugger request when Metro runs in Docker●NEW — New: The first carousel page is blank at launch? Here's why●2.5 ROUTE — From 12/1, Gemini 2.5 requests reroute to newer models at new rates. 6 days left●PRICING — Before picking a plan, count how often you rebuild in a month — it makes the limit easier to set●PREVIEW — Since 11/24, the preview stays up while Rork rebuilds, so you can keep using the previous version●SONNET 4.5 — Sonnet 4.5 retires from the Claude API on 11/30, 5 days left. Check which model your AI features call●DOCKER — Expo users report the dev server exiting on a debugger request when Metro runs in Docker●NEW — New: The first carousel page is blank at launch? Here's why●2.5 ROUTE — From 12/1, Gemini 2.5 requests reroute to newer models at new rates. 6 days left●PRICING — Before picking a plan, count how often you rebuild in a month — it makes the limit easier to set
Articles/Dev Tools
⬡ Dev Tools/2026-06-29Advanced

Rork × Vision Camera v4: A Production-Grade Camera Stack with QR, OCR, and ML Inference

Wire React Native Vision Camera v4 into a Rork project end-to-end — frame processors, ML inference, QR/OCR, plus battery and thermal tuning, a real-device test matrix, store review, and a staged rollout.

Vision CameraReact Native244Rork622Frame ProcessorMLKitQR CodeOCREAS Build25

✦ Premium Article

An Expo Camera prototype tends to work within the hour. Then you try to make it shippable, and the work balloons: per-frame processing, recorded audio, fps that behaves differently on every device. None of that is within Expo Camera's reach.

Moving to Vision Camera v4 trades that for a four-way knot of EAS Custom Dev Client, Worklets, iOS AVAudioSession, and Android Camera2. Get one wrong and you may see a black screen on a real iPhone while the simulator runs fine, or QR scanning works and audio recording takes the process down.

From here I'll wire Vision Camera v4 into a Rork project: QR and barcode detection, text recognition with ML Kit, then photo and video capture. The code below is checked against the official docs. Where an earlier version of this article had code that doesn't work, I say so and fix it.

Per-frame work belongs on the camera thread; heavy work gets throttled before it reaches JS. Everything below hangs off that one sentence.

Why Vision Camera v4 instead of Expo Camera

Most Rork templates ship with Expo Camera, and for a basic QR scanner or a one-shot photo, it's perfectly enough. The reason this article uses Vision Camera v4 is that anything serious — anything that needs per-frame work — runs into the limits of Expo Camera fast.

I think about the choice with three questions:

  • Do I need per-frame access in JS? QR scanning, OCR, and on-device ML inference all need this. Vision Camera v4 lets you do it inside Worklets without blocking the UI thread.
  • Do I need fine-grained capture control? Things like HDR, ISO, exposure, and focus distance — if you want to tune them like a real camera app, v4 is far easier than Expo Camera.
  • Do I need to adapt the format per device? Locking everything to 4K@60fps makes low-end devices unstable. Vision Camera v4's useCameraFormat picks from the formats each device actually supports.

If you only need a single QR scan or a single still photo, stay on Expo Camera — you'll save build time and headaches. The trade-off is sharp: don't pay the v4 tax unless you need frame-level work.

Adding Vision Camera v4 to a Rork project: the EAS Custom Dev Client step

Vision Camera v4 ships native modules, so it can't run in Expo Go. After you export from Rork, you need an EAS Custom Dev Client. This is the first wall most teams hit.

# 1. Install Vision Camera and the Worklets runtime (QR/barcodes use the built-in useCodeScanner, so no extra scanner package)
npx expo install react-native-vision-camera
npx expo install react-native-worklets-core
 
# 2. Add a Custom Dev Client profile in eas.json
# 3. Build the dev client
eas build --profile development --platform ios
eas build --profile development --platform android

If you forget react-native-worklets-core, the very first frame processor mount throws JSI is not available. I tripped on this on day one. Frame processors in v4 run on Worklets, so install the two as a pair. Pure QR scanning works without it, but if you might add frame work later, install it from the start.

Add the plugin block to app.json. The microphone copy is read by App Store reviewers, so be specific.

{
  "expo": {
    "plugins": [
      [
        "react-native-vision-camera",
        {
          "cameraPermissionText": "We use the camera to scan QR codes and documents.",
          "enableCodeScanner": true,
          "enableLocation": false,
          "enableMicrophonePermission": true,
          "microphonePermissionText": "We use the microphone to record audio with video clips."
        }
      ]
    ]
  }
}

On the EAS side, bump the build timeout to 60 minutes for builds that include Vision Camera. The default 30 minutes timed out on me a few times.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦A runAtTargetFps-based frame-throttling pattern that keeps long camera sessions cool and battery-friendly
✦A real-device test matrix and the App Store / Play Store review checklist for camera apps
✦API names checked against the official v4 docs (photoQualityBalance, runAtTargetFps, Worklets.createRunOnJS), with the broken snippets fixed
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Rork Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

Related Articles

⬡ Dev Tools2026-05-06
Adding Expo Dev Client to Your Rork App
Added a native module to a Rork app and Expo Go no longer opens it? Here is how to set up Expo Dev Client (a custom development build), including the prebuild trap, when a rebuild is needed, and how EAS Update fits in.
⬡ Dev Tools2026-11-04
Catching the Few Seconds Before Streaming Audio Starts: A Loading State and a Timeout
You tap play and nothing happens for a moment. Here is how I model that gap with expo-audio: a requested flag, a 400ms delayed spinner, and an 8-second timeout.
⬡ Dev Tools2026-09-21
A build that stops with exit code 0 — the flag that silenced the log, and the check that let an empty file through
Two reports landed in the same week: eas build --local stopping with exit code 0 but produced no further output, and a zero-byte stub that never got embedded. Both came down to settings that reduce output. Here is how to audit your own scripts.