Skip to content

ReactVision 2.43.1 #347

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 55 commits into from
Jun 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
2151bd5
update: add the interop layer
doranteseduardo Jun 3, 2025
8a54c53
update: integrate the build flow all together
doranteseduardo Jun 3, 2025
48194d6
update: architecture auto detection
doranteseduardo Jun 3, 2025
91b3f99
update: Centralise ViroGlobal for the native layer
doranteseduardo Jun 3, 2025
7e87b89
update: documentation
doranteseduardo Jun 3, 2025
4de64ba
update: better error handling
doranteseduardo Jun 3, 2025
6ca8c23
update: expo plugin support (WIP)
doranteseduardo Jun 3, 2025
92b2971
Update NEW_ARCHITECTURE_IMPLEMENTATION.md
doranteseduardo Jun 3, 2025
9152610
update: attributions
doranteseduardo Jun 3, 2025
1628f5e
update: interop layer documentation
doranteseduardo Jun 3, 2025
17b1636
update: New Architecture mandatory, add missing Android files, fix iO…
doranteseduardo Jun 11, 2025
4975517
update: bix building issues, update docs, handle legacy arch
doranteseduardo Jun 12, 2025
6938367
update: properly detect RN min version and setup JSI bindings on RN 0…
doranteseduardo Jun 12, 2025
4678f4a
update: fix building issues
doranteseduardo Jun 12, 2025
756b677
update: use event emitter to avoid issues with the bridge
doranteseduardo Jun 12, 2025
67f6b53
update: remove package.json check to prevent bundling issues
doranteseduardo Jun 12, 2025
5126458
update: assume min sdk version is used, fix android building issues
doranteseduardo Jun 12, 2025
5ce68a3
update: fix cmake building error
doranteseduardo Jun 12, 2025
6a1beaa
update: fix issue making JS not discover the public methods
doranteseduardo Jun 12, 2025
9c9ce2c
update: fix jni references
doranteseduardo Jun 13, 2025
f2f8774
update: use main app references to avoid circular deps
doranteseduardo Jun 13, 2025
225e6e5
update: all components are using the new context correctly, remove ap…
doranteseduardo Jun 24, 2025
fe95691
update: align remaining components from the initial iteration
doranteseduardo Jun 24, 2025
08d27c0
update: remove android placeholders
doranteseduardo Jun 24, 2025
c63240c
ios: add missing jsi interfaces on ios
doranteseduardo Jun 24, 2025
5c15e81
update: add explicit node support
doranteseduardo Jun 24, 2025
7f98215
update: align viro signatures
doranteseduardo Jun 24, 2025
4bca35f
update: fix vrt signatures
doranteseduardo Jun 24, 2025
aff4820
update: property setting system fixed
doranteseduardo Jun 24, 2025
661cac7
update: Missing Core Infrastructure
doranteseduardo Jun 24, 2025
d69b37c
update: Event System Integration
doranteseduardo Jun 24, 2025
8dd2d33
update: better scene & memory management
doranteseduardo Jun 24, 2025
a4c6308
update: complete js layer integration
doranteseduardo Jun 24, 2025
336772a
update: make all components use our new event system
doranteseduardo Jun 24, 2025
b867ca2
update: better implementation for the jsi bridge
doranteseduardo Jun 24, 2025
ea94321
update: new architecture first
doranteseduardo Jun 24, 2025
da03b98
update: documentation
doranteseduardo Jun 24, 2025
c03fb0a
update: fix building issues
doranteseduardo Jun 24, 2025
99adfc6
update: fix folly issue
doranteseduardo Jun 25, 2025
ee53cf6
update: move docs to a subfolder
doranteseduardo Jun 25, 2025
999df1e
update: fix android building issues by merging the android interop la…
doranteseduardo Jun 25, 2025
9b41828
update: consolidate ios directories (to align with android)
doranteseduardo Jun 25, 2025
d33b7c8
Update README.md
doranteseduardo Jun 25, 2025
6fe4996
update: remove unused examples
doranteseduardo Jun 25, 2025
522aac1
Create Podfile.lock
doranteseduardo Jun 25, 2025
f8573ea
update: fix broken imports and force na in podspec
doranteseduardo Jun 25, 2025
330b8d8
update: fix method signature
doranteseduardo Jun 25, 2025
4a4771b
update: fix podspec and a broken condition
doranteseduardo Jun 25, 2025
ea50a70
update: simplify fabric integration
doranteseduardo Jun 25, 2025
e8945dd
Update ViroFabricSceneManager.mm
doranteseduardo Jun 25, 2025
4e33764
Update ViroFabricContainerComponentView.mm
doranteseduardo Jun 25, 2025
74c11be
update: final alignments for solving the building issues reported
doranteseduardo Jun 26, 2025
974dab0
update: add statistic methods, proper registration
doranteseduardo Jun 26, 2025
e89ee64
update: deleted old docs
doranteseduardo Jun 26, 2025
64bcbbe
update: changelog
doranteseduardo Jun 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,4 @@ test/ios/fastlane/report.xml
test/ios/fastlane/README.md
test/android/fastlane/README.md
test/android/fastlane/report.xml
/android/viro_bridge/.cxx/Debug
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# CHANGELOG

## v2.43.1 - 26 June 2025

- Added support for React Native New Architecture (Fabric)
- Added examples demonstrating how to use ViroReact with automatic architecture detection
- Updated documentation with information about the New Architecture support
- Deprecated legacy architecture support (removed completely)

## v2.42.0 - 7 February 2025

- Compatibility with Expo 52
Expand Down
33 changes: 30 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,40 @@ If you are starting a fresh project with ViroReact, consider cloning one of our
- [React Native](https://github.com/ReactVision/starter-kit)
- [Expo + JavaScript](https://github.com/ReactVision/expo-starter-kit)

## React Native New Architecture Support

ViroReact now supports React Native's New Architecture (Fabric) with automatic detection. The library will automatically detect whether your app is using the New Architecture and use the appropriate implementation:

```javascript
// Import ViroReact components - they will automatically use the right implementation
import { ViroARScene, Viro3DObject } from "@reactvision/react-viro";
```

If you prefer to explicitly use a specific implementation, you can still do so:

```javascript
// Explicitly use the Legacy Architecture implementation
import { ViroARScene, Viro3DObject } from "@reactvision/react-viro/index";

// Explicitly use the New Architecture (Fabric) implementation
import { ViroARScene, Viro3DObject } from "@reactvision/react-viro/fabric";
```

The API remains the same across all implementations, but the New Architecture version provides better performance and compatibility with future React Native versions.

> **Note:** The Legacy Architecture support is deprecated and will be removed in version 3.0.0. We recommend enabling the New Architecture in your app for better performance and future compatibility.

For more detailed information about the New Architecture support, including API compatibility and known limitations, see the [NEW_ARCHITECTURE.md](./NEW_ARCHITECTURE.md) document.

# Examples

See our [Example projects](https://viro-community.readme.io/docs/examples) page. These are a little old (~2019) but are a great reference point for how to use bits of the library.
Check out the [examples](./examples) directory for sample code demonstrating how to use ViroReact with automatic architecture detection and other features.

You can also see our [Example projects](https://viro-community.readme.io/docs/examples) page. These are a little old (~2019) but are a great reference point for how to use bits of the library.

# Need help? Or want to contribute?

Whether you're looking for support with building your AR or VR application or you want to contribute to ViroReact, the best way to contact our team is via Discord. If you need more hands-on support with a project, you can visit our documentation site, where we have a [list of trusted partners whom you can hire to help with your project](https://viro-community.readme.io/docs/hire-a-viro-react-expert).
Whether you're looking for support with building your AR or VR application or you want to contribute to ViroReact, the best way to contact our team is via Discord. If you need more hands-on support with a project, you can visit our documentation site, where we have a [list of trusted partners whom you can hire to help with your project](https://viro-community.readme.io/docs/hire-a-viro-react-expert).

<a href="https://discord.gg/H3ksm5NhzT">
<img src="https://discordapp.com/api/guilds/774471080713781259/widget.png?style=banner2" alt="Discord Banner 2"/>
Expand All @@ -51,7 +78,7 @@ Whether you're looking for support with building your AR or VR application or yo

ViroReact was originally developed by the [Viro Media](http://www.viromedia.com/), but was open-sourced in 2019. In late 2020, the Viro Community was formed to help maintain and move the project onwards, updating it so it could run with modern versions of React Native, and start to add in new features.

Following years of support, in 2025, [Morrow acquired ReactVision](https://www.themorrow.digital/blog/morrow-acquires-reactvision-and-viroreact-library) to help accelerate its development and give it the resources needed to enable ReactVision to capture the rapidly growing demand for ViroReact. ReactVision now has a team working full-time to help ensure the codebase is updated and ready for the future of XR / Spatial Computing. Our vision is to enable React Native developers to build AR and VR applications that can run across all XR devices (smartphones, smart glasses, and headsets) off of a single React Native codebase.
Following years of support, in 2025, [Morrow acquired ReactVision](https://www.themorrow.digital/blog/morrow-acquires-reactvision-and-viroreact-library) to help accelerate its development and give it the resources needed to enable ReactVision to capture the rapidly growing demand for ViroReact. ReactVision now has a team working full-time to help ensure the codebase is updated and ready for the future of XR / Spatial Computing. Our vision is to enable React Native developers to build AR and VR applications that can run across all XR devices (smartphones, smart glasses, and headsets) off of a single React Native codebase.

We, as a community, owe a great debt to Viro Media and the people who developed this library originally. We hope to make them proud as it continues to develop and grow within ReactVision.

Expand Down
3 changes: 3 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ android.useDeprecatedNdk=true

android.useAndroidX=true
android.enableJetifier=true

# Enable New Architecture required by Viro Fabric Interop
newArchEnabled=true
Binary file modified android/react_viro/react_viro-release.aar
Binary file not shown.
3 changes: 2 additions & 1 deletion android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") }
plugins { id("com.facebook.react.settings") }
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
includeBuild("../node_modules/@react-native/gradle-plugin")
include ':gvr_common', ':viro_bridge', ':viro_renderer', ':arcore_client'
include ':gvr_common', ':viro_bridge', ':viro_renderer', ':arcore_client', ':fabric-interop'
project(':fabric-interop').projectDir = new File(rootProject.projectDir, '../fabric-interop/android')
50 changes: 50 additions & 0 deletions android/viro_bridge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,73 @@ apply plugin: 'com.android.library'
apply plugin: "kotlin-android"
apply plugin: "com.facebook.react"

// Check if the new architecture is enabled
def isNewArchitectureEnabled() {
return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
}

android {
compileSdkVersion 34
namespace "com.viromedia.bridge"

buildFeatures {
buildConfig true
}

defaultConfig {
minSdkVersion 24
targetSdkVersion 33
versionCode 1
versionName "1.0"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'

// Add build config for New Architecture detection
buildConfigField("boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString())
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

sourceSets {
main {
java.srcDirs = ['src/main/java']
jniLibs.srcDirs = ['src/main/jniLibs']
}
}

// Add C++ build for JSI bridge - Enable when CMake is available
// To enable JSI bridge compilation, uncomment the following block:
/*
if (isNewArchitectureEnabled()) {
externalNativeBuild {
cmake {
path "src/main/cpp/CMakeLists.txt"
version "3.13.0"
}
}

defaultConfig {
externalNativeBuild {
cmake {
cppFlags "-std=c++17", "-fexceptions", "-frtti", "-DWITH_INSPECTOR=1"
abiFilters "arm64-v8a", "armeabi-v7a", "x86", "x86_64"
arguments "-DANDROID_STL=c++_shared",
"-DREACT_NATIVE_DIR=${rootProject.projectDir}/../node_modules/react-native",
"-DNODE_MODULES_DIR=${rootProject.projectDir}/../node_modules"
}
}
}
}
*/
}

dependencies {
Expand Down
36 changes: 36 additions & 0 deletions android/viro_bridge/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
cmake_minimum_required(VERSION 3.13.0)

set(CMAKE_VERBOSE_MAKEFILE on)

add_library(virofabricjsi
SHARED
fabric/ViroFabricContainerJSI.cpp)

# Configure C++17
set_target_properties(
virofabricjsi PROPERTIES
CXX_STANDARD 17
CXX_EXTENSIONS OFF
POSITION_INDEPENDENT_CODE ON
)

# Find required packages
find_package(fbjni REQUIRED CONFIG)
find_package(ReactAndroid REQUIRED CONFIG)

target_link_libraries(
virofabricjsi
fbjni::fbjni
ReactAndroid::jsi
ReactAndroid::reactnativejni
android
log
)

# Include directories
target_include_directories(virofabricjsi PRIVATE
"${REACT_NATIVE_DIR}/ReactCommon"
"${REACT_NATIVE_DIR}/ReactCommon/jsi"
"${REACT_NATIVE_DIR}/ReactAndroid/src/main/jni"
"${REACT_NATIVE_DIR}/ReactAndroid/src/main/jni/react/jni"
)
Loading