Open
Description
Environment
react-native -v: 0.76.7
npm ls react-native-macos: 0.76.6
node -v: v22.13.1
xcodebuild -version: 16.2
Steps to reproduce the bug
- Clone chore: bump
react-native
to 0.76 react-native-test-app#2335 - Install npm dependencies:
yarn
- Install Pods:
cd example pod install --project-directory=ios
- Build:
yarn ios
Expected Behavior
iOS builds successfully.
Actual Behavior
Old Architecture on 0.76.7 fails to build because it cannot find allowRecursiveCommitsWithSynchronousMountOnAndroid
:
[React-featureflagsnativemodule] Compiling NativeReactNativeFeatureFlags.cpp
Error: no member named 'allowRecursiveCommitsWithSynchronousMountOnAndroid' in 'facebook::react::NativeReactNativeFeatureFlags'
bridging::getParameterCount(&T::allowRecursiveCommitsWithSynchronousMountOnAndroid) == 1,
~~~^
Reproducible Demo
microsoft/react-native-test-app#2335
Additional context
This seems to only happen if you also have react-native-macos
installed. The generated FBReactNativeSpecJSI.h
will include allowRecursiveCommitsWithSynchronousMountOnAndroid
because it hasn't been removed from react-native-macos
yet.
I think out-of-tree platforms should be able to have different feature flags. The fact that it overwrites iOS's FBReactNativeSpecJSI.h
sounds like a bug/limitation to me.
Previously filed here: facebook#49321