Installing ViroReact
Installation instructions
ViroReact 3.2 and 3.3 (3.2.0 to 3.2.3, and 3.3.0) require React Native 0.88 and Expo SDK 58, with the New Architecture (Fabric). React Native 0.86 and Expo SDK 57 stay on ViroReact 3.1.x.
If you are starting a new project, please consider using our Starter Kit as a basis for your app.
The steps below are for manually installing and linking the library to an existing React Native project. We do not yet support auto-linking.
Install
NPM
$ npm install --save @reactvision/react-viro
Yarn
$ yarn add @reactvision/react-viro
ViroReact 3.3.0
- No new requirements for phones and headsets: same React Native 0.88 and Expo SDK 58 as 3.2.0. Update with
npm install @reactvision/[email protected]. iOS behaves as in 3.2.3.- Web: install
@reactvision/viro-web-renderer1.4.0. It is now the peer range (^1.4.0). Copy the renderer's wholewasm/andslam/folders. With 1.3.0 the new features stay off and a one-time warning names what is missing. See the Web Setup Guide.- Materials with an
emissionTexturealso need anemissionColor, on every platform: the texture scales it, and it is black by default. On Android,emissionColor,emissionTextureandreflectiveTexturenow work, so check materials that set them. See ViroMaterials.- ONNX detector:
@reactvision/react-viro-onnx1.1.0 is out with this release (1.0.3 still installs). On iOS it runs the model on CoreML, on the GPU and Neural Engine, with a CPU fallback. On Android it registers only onarm64-v8aandx86_64. See ViroObjectDetector.- See the 3.3.0 changelog.
ViroReact 3.2.3
- No new requirements for phones and headsets: same React Native 0.88 and Expo SDK 58 as 3.2.0. Update with
npm install @reactvision/[email protected].- Web: install
@reactvision/viro-web-renderer1.3.0. It is now the peer range (^1.3.0). Copy the renderer's wholewasm/folder. With 1.2.0 the new features stay off and a one-time warning names what is missing. See the Web Setup Guide.- Android on Expo SDK 58: a minified release build no longer crashes at launch in WorkManager's database. On 3.1.0 to 3.2.2 this could hit any minified Viro Android build at launch, whether or not the app uses VPS, unless another dependency already brings Room 2.6 or newer. The keep rule in 3.2.3 is the complete fix; you need no rule of your own. Build a minified release APK and open it on a device before you ship. With the ONNX detector, keep using
@reactvision/react-viro-onnx1.0.3.- See the 3.2.3 changelog.
ViroReact 3.2.2
- No new requirements for phones and headsets: same React Native 0.88 and Expo SDK 58 as 3.2.0. Update with
npm install @reactvision/[email protected].- Web: install
@reactvision/viro-web-renderer1.2.0. It is now the peer range (^1.2.0). Copy the renderer's wholewasm/folder, which now carries the Roboto faces that styledViroTextuses. See the Web Setup Guide.- Android on Expo SDK 58: R8 is on for release builds by default. Build a minified release APK and open it on a device before you ship. A minified VR (GVR) build now keeps the GVR classes its native library needs. With the ONNX detector, use
@reactvision/react-viro-onnx1.0.3.- See the 3.2.2 changelog.
ViroReact 3.2.1
- No new requirements: same React Native 0.88 and Expo SDK 58 as 3.2.0. Update with
npm install @reactvision/[email protected].- Android release builds with R8 minification pass. Viro's consumer rules now tell R8 to ignore classes the bundled GVR SDK references but does not ship, so you no longer need your own
-dontwarnrules forMissing classes detected while running R8.- See the 3.2.1 changelog.
ViroReact 3.2.0
- Breaking: needs React Native 0.88 and Expo SDK 58. Upgrade them first: 3.2.0 does not install next to
react-native0.86.- Upgrading? See Upgrading to 3.2.0.
ViroReact 3.1.0
- iOS Simulator: apps using ViroReact now build and run in the iOS Simulator. AR scenes still need a device, as ARKit has no simulator support.
- Usage data: each scene navigator sends ReactVision a small usage ping when it mounts. You can turn it off; see Usage Data.
- Upgrading? See Upgrading to 3.1.0.
Complete your integration
Now that you've installed the ViroReact library into your project, you'll need to complete your setup by following one of our two integration guides.
Updated about 19 hours ago