Skip to content

Commit e279bc6

Browse files
RN 0.81.6 iOS/Android and 0.81.4 Windows (#733)
* RN 0.81.6 iOS/Android and 0.81.4 Windows * fix TS * cmake var name mismatch * RN version in readme * up pod lock * null instead of undefined
1 parent 1b3cf55 commit e279bc6

10 files changed

Lines changed: 9943 additions & 27354 deletions

File tree

Apps/Playground/ios/Podfile.lock

Lines changed: 485 additions & 353 deletions
Large diffs are not rendered by default.

Apps/Playground/package-lock-windows.json

Lines changed: 2956 additions & 6923 deletions
Large diffs are not rendered by default.

Apps/Playground/package-lock.json

Lines changed: 3006 additions & 13608 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Apps/Playground/package-windows.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,34 @@
1414
"@babylonjs/loaders": "9.0.0",
1515
"@babylonjs/react-native": "file:../../Modules/@babylonjs/react-native",
1616
"@react-native-community/slider": "^4.2.2",
17-
"@react-native/new-app-screen": "0.80.0",
17+
"@react-native/new-app-screen": "^0.81.4",
1818
"@rnx-kit/metro-config": "2.1.0",
1919
"base-64": "^1.0.0",
20-
"react": "19.1.0",
21-
"react-native": "0.79.4",
20+
"react": "19.1.4",
21+
"react-native": "^0.81.4",
2222
"react-native-permissions": "^5.4.1",
23-
"react-native-windows": "0.79.1"
23+
"react-native-windows": "^0.81.4"
2424
},
2525
"devDependencies": {
2626
"@babel/core": "^7.25.2",
2727
"@babel/preset-env": "^7.25.3",
2828
"@babel/runtime": "^7.25.0",
29-
"@react-native-community/cli": "19.0.0",
30-
"@react-native/babel-preset": "0.80.0",
31-
"@react-native/eslint-config": "0.80.0",
32-
"@react-native/metro-config": "0.80.0",
33-
"@react-native/typescript-config": "0.80.0",
29+
"@react-native-community/cli": "20.0.0",
30+
"@react-native/babel-preset": "^0.81.4",
31+
"@react-native/eslint-config": "^0.81.4",
32+
"@react-native/metro-config": "^0.81.4",
33+
"@react-native/typescript-config": "^0.81.4",
3434
"@types/jest": "^29.5.13",
3535
"@types/react": "^19.1.0",
3636
"@types/react-test-renderer": "^19.1.0",
3737
"eslint": "^8.19.0",
3838
"jest": "^29.6.3",
3939
"prettier": "2.8.8",
4040
"react-test-renderer": "19.1.0",
41-
"react-native-test-app": "^4.3.15",
41+
"react-native-test-app": "^5.0.0",
4242
"typescript": "5.0.4"
4343
},
4444
"engines": {
45-
"node": ">=18"
45+
"node": ">=20"
4646
}
47-
}
47+
}

Apps/Playground/package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,35 +14,35 @@
1414
"@babylonjs/loaders": "9.0.0",
1515
"@babylonjs/react-native": "file:../../Modules/@babylonjs/react-native",
1616
"@react-native-community/slider": "^4.2.2",
17-
"@react-native/new-app-screen": "0.80.0",
17+
"@react-native/new-app-screen": "^0.81.6",
1818
"@rnx-kit/metro-config": "2.1.0",
1919
"base-64": "^1.0.0",
20-
"react": "19.0.0",
21-
"react-native": "0.79.4",
20+
"react": "19.1.4",
21+
"react-native": "^0.81.6",
2222
"react-native-permissions": "^5.4.1",
23-
"react-native-windows": "0.79.1",
23+
"react-native-windows": "^0.81.4",
2424
"react-native-config": "1.5.5"
2525
},
2626
"devDependencies": {
2727
"@babel/core": "^7.25.2",
2828
"@babel/preset-env": "^7.25.3",
2929
"@babel/runtime": "^7.25.0",
30-
"@react-native-community/cli": "19.0.0",
31-
"@react-native/babel-preset": "0.80.0",
32-
"@react-native/eslint-config": "0.80.0",
33-
"@react-native/metro-config": "0.80.0",
34-
"@react-native/typescript-config": "0.80.0",
30+
"@react-native-community/cli": "20.0.0",
31+
"@react-native/babel-preset": "^0.81.6",
32+
"@react-native/eslint-config": "^0.81.6",
33+
"@react-native/metro-config": "^0.81.6",
34+
"@react-native/typescript-config": "^0.81.6",
3535
"@types/jest": "^29.5.13",
36-
"@types/react": "^19.0.0",
37-
"@types/react-test-renderer": "^19.0.0",
36+
"@types/react": "^19.1.0",
37+
"@types/react-test-renderer": "^19.1.0",
3838
"eslint": "^8.19.0",
3939
"jest": "^29.6.3",
4040
"prettier": "2.8.8",
41-
"react-test-renderer": "19.0.0",
42-
"react-native-test-app": "^4.3.15",
41+
"react-test-renderer": "19.1.0",
42+
"react-native-test-app": "^5.0.0",
4343
"typescript": "5.0.4"
4444
},
4545
"engines": {
46-
"node": ">=18"
46+
"node": ">=20"
4747
}
48-
}
48+
}

Modules/@babylonjs/react-native/EngineView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const EngineView: FunctionComponent<EngineViewProps> = (props: EngineView
2727
//const [fps, setFps] = useState<number>();
2828
const [sceneStats, setSceneStats] = useState<SceneStats>();
2929
const engineViewRef = useRef<Component<NativeEngineViewProps>>(null);
30-
const snapshotPromise = useRef<{ promise: Promise<string>, resolve: (data: string) => void }>();
30+
const snapshotPromise = useRef<{ promise: Promise<string>, resolve: (data: string) => void } | null>(null);
3131
const isTransparent = props.isTransparent ?? false;
3232
const antiAliasing = props.antiAliasing ?? 0;
3333
const androidView = props.androidView ?? "";
@@ -109,7 +109,7 @@ export const EngineView: FunctionComponent<EngineViewProps> = (props: EngineView
109109
const { data } = event.nativeEvent as Event & { data: string };
110110
if (snapshotPromise.current) {
111111
snapshotPromise.current.resolve(data);
112-
snapshotPromise.current = undefined;
112+
snapshotPromise.current = null;
113113
}
114114
}, []);
115115

Modules/@babylonjs/react-native/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ This package has several **peer dependencies**. If these dependencies are unmet,
1010

1111
The `react-native-permissions` dependency is required for XR capabilities of Babylon.js (to request camera permissions automatically). Be sure to follow the `react-native-permissions` [instructions](https://github.com/react-native-community/react-native-permissions#setup) to update your `Podfile` and `Info.plist` (iOS) and/or `AndroidManifest.xml` (Android). These plugins can be disabled and by such, dependency to `react-native-permissions` is not needed anymore (see below).
1212

13+
### React Native minimum version
14+
15+
| BabylonReactNative version | iOS / Android | Windows |
16+
| -------------------------- | -------------------- | ----------------------------- |
17+
| next / main | react-native 0.81.6+ | react-native-windows 0.81.4+ |
18+
| 2.0.0 - 2.0.2 | react-native 0.79.4 | react-native-windows 0.79.1 |
19+
1320
### Android Configuration
1421

1522
The minimum Android SDK version is 21. This must be set as `minSdkVersion` in the consuming project's `build.gradle` file.

Modules/@babylonjs/react-native/android/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ disable_warnings(${PACKAGE_NAME}) # deprecated stl
216216

217217
# Set RN_SERIALIZABLE_STATE and C++ flags for React Native 0.81+
218218
if(${REACT_NATIVE_VERSION} GREATER_EQUAL 80)
219-
include("${REACT_NATIVE_DIR}/ReactCommon/cmake-utils/react-native-flags.cmake")
219+
include("${REACTNATIVE_DIR}/ReactCommon/cmake-utils/react-native-flags.cmake")
220220
target_compile_reactnative_options(${PACKAGE_NAME} PRIVATE)
221221
else()
222222
string(APPEND CMAKE_CXX_FLAGS

0 commit comments

Comments
 (0)