-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Description
When building with Expo SDK 54 (React Native 0.81.4) + New Architecture enabled, the iOS build fails in the RNGestureHandler Fabric module. shadowNodeFromValue is undefined because REACT_NATIVE_MINOR_VERSION is not defined, so the iOS helper never compiles. As a result Fastlane/Xcode exits with:
- use of undeclared identifier 'shadowNodeFromValue'; did you mean 'shadowNodeListFromValue'?
- no member named 'getTraits' in 'std::vector<std::shared_ptr>'
- 'std::vector<std::shared_ptr>' is not polymorphic
Environment
- Expo SDK 54.0.12
- React Native 0.81.4
- react-native-gesture-handler 2.25.0
- react-native-reanimated 4.1.2
- iOS build via EAS (fastlane)
- RCT_NEW_ARCH_ENABLED=1 / EXPO_NEW_ARCH_ENABLED=1
Expected Result
Build succeeds with RNGestureHandler + Fabric under the New Architecture.
Actual Result
Build fails at “Install pods” / “Run fastlane” with the compiler errors listed above.
Workaround
Adding both a fallback for REACT_NATIVE_MINOR_VERSION and a local shadowNodeFromValue helper fixes the build. The minimal change we use today:
// [cpp-adapter.cpp](http://_vscodecontentref_/0) (same idea in iOS functions.mm)
#ifndef REACT_NATIVE_MINOR_VERSION
#define REACT_NATIVE_MINOR_VERSION 81
#endif
#include <react/renderer/bridging/Bridging.h>
#if REACT_NATIVE_MINOR_VERSION >= 81
static inline std::shared_ptr<const ShadowNode> shadowNodeFromValue(
jsi::Runtime &runtime,
const jsi::Value &shadowNodeWrapper) {
return Bridging<std::shared_ptr<const ShadowNode>>::fromJs(runtime, shadowNodeWrapper);
}
#endifSteps to reproduce
npx create-expo-app --template expo-template-blank@54 expo-rngh-new-archcd expo-rngh-new-archnpm install react-native-gesture-handler@2.25.0 react-native-reanimated@4.1.2- Enable new architecture
• app.json →"expo": { "newArchEnabled": true, "ios": { "newArchEnabled": true } }
• eas.json →"env": { "RCT_NEW_ARCH_ENABLED": "1", "EXPO_NEW_ARCH_ENABLED": "1" } eas build --platform ios --profile production
Expected Result
Build succeeds with RNGestureHandler + Fabric under the New Architecture.
Actual Result
Build fails at “Install pods” / “Run fastlane” with the compiler errors listed above.
Workaround
Adding both a fallback for REACT_NATIVE_MINOR_VERSION and a local shadowNodeFromValue helper fixes the build. The minimal change we use today:
// [cpp-adapter.cpp](http://_vscodecontentref_/0) (same idea in iOS functions.mm)
#ifndef REACT_NATIVE_MINOR_VERSION
#define REACT_NATIVE_MINOR_VERSION 81
#endif
#include <react/renderer/bridging/Bridging.h>
#if REACT_NATIVE_MINOR_VERSION >= 81
static inline std::shared_ptr<const ShadowNode> shadowNodeFromValue(
jsi::Runtime &runtime,
const jsi::Value &shadowNodeWrapper) {
return Bridging<std::shared_ptr<const ShadowNode>>::fromJs(runtime, shadowNodeWrapper);
}
#endifA link to a Gist, an Expo Snack or a link to a repository based on this template that reproduces the bug.
https://gist.github.com/jj-devs/d204fbd5c3c8807fd2c8febd200cb34d
Gesture Handler version
2.25.0
React Native version
0.81.4
Platforms
iOS
JavaScript runtime
Hermes
Workflow
Using Expo Prebuild or an Expo development build
Architecture
New Architecture (Fabric)
Build type
Release mode
Device
None
Device model
N/A – occurs on Expo EAS build infrastructure
Acknowledgements
Yes