ViroReact 2.57.0: On-Device Object Detection and Expo 56 Support

ViroReact 2.57.0 gives your AR app something it could not do before: recognise objects in the camera feed, on the device, with no cloud round trip. Alongside that headline feature, this release adds support for Expo 56, sharpens AR depth on iOS, fixes layered glTF animations, and brings your builds in line with the latest Google Play and Meta Quest Store submission rules. Here is what changed.
See the real world with ViroObjectDetector
The headline of this release is a new component, ViroObjectDetector. It runs YOLOE object detection directly on the device through ONNX Runtime. Point it at the camera and it reports what it sees through the onDetection event: a label, a confidence score, and a normalised bounding box.
It can open its own camera, or share your existing AR session when you set useARSession. Because inference runs on device, no image leaves the phone and there is no network latency in the loop. That matters for privacy-sensitive use cases and for anything that has to keep pace with a live camera feed.
In AR mode each detection also carries a screenBoundingBox in density-independent points, already aligned to the on-screen camera preview. You can position an overlay straight onto it without extra maths. Detection and the 2D overlay work the same way on iOS and Android. The 3D worldPosition raycast, which places a detection in 3D space, is iOS only for now.
Inference lives in a companion package, @reactvision/react-viro-onnx, which uses the NNAPI execution provider with FP16 on Android. Install both packages to switch it on:
npm install @reactvision/react-viro @reactvision/react-viro-onnxThe detector has no built-in inference path. If the provider is not installed it produces no detections and calls onError, so the failure mode is explicit rather than silent. Setup, model bundling, and the coordinate system are documented in docs/ViroObjectDetector.md.
Sharper AR depth on iOS
Depth points now come straight from the AR depth map instead of an approximation, and the monocular depth model warms up before its first use. In practice that removes the inaccurate, late depth values that used to show up on the first frames, and it improves occlusion and hit-testing on devices without LiDAR.
There is also a new onDepthReady event on ViroARScene, on both iOS and Android. It fires once, the moment AR depth becomes available, so you can hold back depth-dependent features until the data is actually there.
Builds that pass store review
If you ship to Android, this one matters. The bundled OpenXR loader is now aligned to a 16 KB memory page size (the loader moved from 1.1.38 to 1.1.49). The old 4 KB alignment fails the 16 KB page requirement on Android 15 and later, which blocks submission to both Google Play and the Meta Quest Store. With 2.57.0 your XR builds clear that check. Apps that do not use XR are unaffected.
Layered Blender animations that play to the end
glTF and GLB skeletal clips that mixed STEP and LINEAR interpolation, or used several independent time-grids, were being dropped or frozen instead of played. That is a common shape for layered animations exported from Blender. The loader now resamples every channel in a skin onto one shared time-grid and merges each joint into a single keyframe animation, with a per-frame density cap so large clips stay performant. These animations now run to the end.
Expo SDK 56
The config plugin and prebuilt artifacts now build against Expo 56 and React Native’s new architecture.
Also in this release
A few smaller fixes worth calling out:
- VR controller input works again, after moving the VR event listener onto the new architecture.
onDragnow fires inStudioSceneNavigator.- visionOS-only sources are excluded from the iOS CocoaPods build, which fixes compile errors in iOS-only targets.
Updating
npm install @reactvision/react-viro@2.57.0
# For ViroObjectDetector:
npm install @reactvision/react-viro-onnx
npx expo prebuildThere are no breaking API changes. If you use ViroObjectDetector, bundle your .onnx model into the native project as described in the component docs, and note that expo prebuild --clean removes manually placed assets.
Building with an AI coding agent? Add the ViroReact MCP Server (https://mcp.reactvision.xyz/viro) to your agent so it writes against the current API, including the new ViroObjectDetector props.