One Codebase for AR on Phones and VR on Headsets: Cross-Platform XR in 2026

Short answer: to ship one app that is AR on phones and VR or mixed reality on headsets, you need a framework that targets ARKit, ARCore, OpenXR, and visionOS from one project. Unity can do it in C#, with separate build setups and a paid plan for visionOS. WebXR can do it in a browser, with limited support on iPhone. ViroReact does it natively from one React Native and TypeScript codebase: a single ViroXRSceneNavigator serves an AR scene on iPhone and Android and a VR or MR scene on Meta Quest and Apple Vision Pro, and the web gets the same scenes through ReactVision Editor Scene Links.
The comparison
| Unity | WebXR | ViroReact | |
|---|---|---|---|
| Phone AR (iPhone and Android) | Yes, AR Foundation | Android browsers; no WebXR AR in iPhone Safari | Yes, native ARKit and ARCore |
| Meta Quest VR and MR | Yes | In the Quest browser | Yes, native OpenXR with passthrough MR |
| Apple Vision Pro | Yes, paid Unity plan | Limited | Yes, immersive and mixed (Expo) |
| Language | C# | JavaScript | TypeScript and React Native |
| Licence and fees | Free tier, paid above revenue thresholds | Open standards | MIT, no runtime fees |
The one-codebase pattern
import { ViroXRSceneNavigator } from "@reactvision/react-viro";
export default function App() {
return (
<ViroXRSceneNavigator
arInitialScene={{ scene: PhoneARScene }}
vrInitialScene={{ scene: HeadsetScene }}
/>
);
}- On iPhone and Android, the navigator runs
PhoneARSceneon ARKit or ARCore. See how to build an AR app for iPhone and Android. - On Meta Quest, it runs
HeadsetScenein VR. On Quest 3 and 3S, aViroARScenealso runs as passthrough mixed reality. See how to build a VR app for Meta Quest. - On Apple Vision Pro, it opens an ImmersiveSpace with
HeadsetScene, in mixed or full immersion. See how to build for Apple Vision Pro without Unity Pro.
Shared components (your 3D models, materials, animations, game logic, React state) live once and are used by both scenes. A new device is a build target, not a new project.
Sharing the space, not just the code
Cross-platform is more than rendering. ReactVision Spatial adds what multi-device apps need: Cloud Anchors so content stays put between sessions, Geospatial Anchors for location-based AR, co-location so several people in one room see the same content (phones, Quest, and Vision Pro, within the same device family), and asset hosting with over-the-air updates.
Build it with your agent
Connect the ReactVision MCP server (https://mcp.reactvision.xyz/viro) and ask for the app you want, for example "an AR furniture viewer for phones with a VR showroom on Quest". The agent checks per-device support, writes both scenes, validates them, and renders them for review. Prefer no code? Build the scene in the ReactVision Editor and embed it with StudioSceneNavigator.
Next steps
Oli