Camera Recording Fix (iOS Release Builds)

Postmortem and reference for the iOS release-build camera recording failure (issue #91), fixed 2026-06-04 via the Phenom-earth vision-camera fork.

Camera Recording Fix: iOS Release Builds

Status: RESOLVED 2026-06-04. PhenomApp issue #91, merged in PR #92.

This page records what broke, why, and the exact configuration that now works. Read this before touching anything camera-related; the failure modes here cost builds 28 through 39 to diagnose.

Symptom

The camera record screen rendered a blank black screen in iOS release builds only. Development and simulator builds worked, which made the regression invisible until TestFlight.

Root causes (there were several, layered)

  1. Swift optimisation level. VisionCamera compiled with -Onone under whole-module builds triggered the regression; the fix keeps VisionCamera at -O under singlefile compilation (build 28).
  2. Fork prop rename. The Phenom-earth fork of react-native-vision-camera renamed the Camera component prop input to device. Passing input silently produced no camera session in builds 36 through 39 until the call site was migrated.
  3. Capture session wiring. Recording required a single video output (multiple outputs prevented the capture session from starting), enablePersistentRecorder so the video output’s connection forms ahead of record time, and requesting the microphone permission before the camera permission so the video output is connected when recording starts (builds 36 through 38).
  4. Hook rename. The fork renamed useMovieOutput to useVideoOutput (build 31).

Current known-good configuration

  • Dependency pin: react-native-vision-camera-monorepo from github:Phenom-earth/react-native-vision-camera#e226a617... (v5.0.11). The pin is a deliberate fork freeze; do not bump it to upstream without re-running the device recording test.
  • Camera component: pass the camera device via the device prop (not input).
  • Recording path: single video output, enablePersistentRecorder: true, request mic permission before camera permission.
  • Build settings: VisionCamera stays at -O swift optimisation under singlefile compilation; never -Onone.

Verification procedure

Any change to the camera stack must be verified on a physical device with a release-profile EAS build, not the simulator and not a dev client. Record a clip, confirm the file lands, and confirm the record error path reports to GlitchTip (see Crash Reporting with GlitchTip).

History

Build Change
28 VisionCamera kept at -O under singlefile (not -Onone)
31 useMovieOutput migrated to useVideoOutput (fork rename)
36 Single video output; record errors reported to GlitchTip
37 Mic permission requested before camera permission
38 enablePersistentRecorder enabled
39 Fork updated to e226a617 (v5.0.11); device prop migration; recording confirmed working on device