react-native-reanimated: Not working with Fabric on iOS
Description
Using latest Reanimated (2.4.1) together with the current 0.68 release candidate is not working with the new architecture/fabric enabled on iOS.
Expected behavior
The app compiles with the USE_FABRIC=1 RCT_NEW_ARCH_ENABLED=1
flags.
Actual behavior & steps to reproduce
The app fails to compile with the error:
'react/config/ReactNativeConfig.h' file not found
Snack or minimal code example
npx react-native init ReanimatedFabric --version 0.68.0-rc.1
cd ReanimatedFabric
yarn add react-native-reanimated@2.4.1
cd ios
USE_FABRIC=1 RCT_NEW_ARCH_ENABLED=1 bundle exec pod install
yarn ios
Package versions
name | version |
---|---|
react-native | 0.68.0-rc.0, 0.68.0-rc.1 |
react-native-reanimated | 2.2.4, 2.4.1 |
NodeJS | 16.14.0 |
Xcode | 13.2.1 |
Affected platforms
- Android
- iOS
- Web
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 20
- Comments: 31 (10 by maintainers)
Hello! We’re actively working on porting Reanimated to Fabric but it’s not completely ready yet. In fact, Reanimated integrates quite closely with the renderer system so we need to rewrite some parts specifically for Fabric and that’s exactly what we have been doing for the past few months.
The good news is that in parallel we’re porting react-native-gesture-handler and react-native-screens to Fabric as well so hopefully the developers will be able to enable Fabric in their apps as soon as possible.
edit: Reanimated, Gesture Handler and Screens finally support Fabric! 🎉
+1
FYI this does still seem be happening with react-native 0.68.1 and react-native-reanimated 2.8.0. I really appreciate all the hard work you guys are doing!
we got RN 0.69 released but the error ‘react/config/ReactNativeConfig.h’ file not found is still here
Hey all, just wanted to sum up the discussion and close the issue since it was resolved with the release of 3.0.0-rc.0, which is the very first version that supports the new React Native renderer, Fabric. 🎉
If you’d like to try running Reanimated on the new Fabric architecture, you need to upgrade to React Native 0.69 (or newer) and install Reanimated 3.0.0-rc.0 (or newer). Note that it will not work with Reanimated 2.x or React Native 0.68.x. For more details, check out this blog post.
If you want to use Reanimated on the old Paper architecture, you can still use version 2.x and React Native 0.64+. However, if you don’t use old Reanimated 1 API, we encourage you to upgrade to Reanimated 3 (which is fully-compatible with Reanimated 2 API and built from sources on both platforms).
Currently (as of July 2022), Expo SDK does not support Fabric yet. Expo SDK 45 includes react-native 0.68.2 and react-native-reanimated 2.x which does not support Fabric.
Hey! 👋
The issue doesn’t seem to contain a minimal reproduction.
Could you provide a snippet of code, a snack or a link to a GitHub repository that reproduces the problem?
Same issue. I upgrade
react-native-reanimated
tov2.6.0
still has issue.@fawad-khalil Can you try removing
ios/build
folder of your app?@ahmadzraiq They announced that version 3 should resolve this: https://blog.swmansion.com/announcing-reanimated-3-16167428c5f7
@alantoa @Tjerk-Haaye-Henricus they are actively working on it you can check the Fabric branch https://github.com/software-mansion/react-native-reanimated/tree/fabric
@Commaando Yeah, Reanimated 3.1.0 and 3.2.0 support Fabric only with React Native 0.72 which is not stable yet (currently latest pre-release is 0.72.0-rc.5). Sorry for this, we were just too fast. If you really need to use Reanimated with React Native 0.71, please use
react-native-reanimated@3.0.2
.I am getting this error on RN v0.70.1 with new architecture and fabric enabled. I have installed
3.0.0-rc.2
version of reanimated. Tried re-install node_modules, and pods. Also tried deleting pod lock file and cleaning build from XCode, but didn’t help. @tomekzawIf you want to use Fabric in your app you need to install Reanimated 3, but if you just want to use react-native@0.69 you should use Reanimated 2.9.1
try this, it worked for me
the issue was created on
Feb 10
, but is still not fixed, has someone fixed this on 0.69.0? maybe someone has a git patch for this?@dutradotdev
yes, this is correct.
@mikeislearning “If you’d like to try running Reanimated on the new Fabric architecture, make sure that you are using at least version 0.69 of React Native”
so it’s not working for expo SDK 45, right? (Expo SDK 45 uses v0.68.2)
Issue still exists with the latest version