I’ve been running "pod install" in my project to connect my dependencies but I’ve been getting this error: Can't merge user_target_xcconfig for pod targets: ["Reanimated", "hermes-engine"] Singular build setting CLANG_CXX_LIBRARY has different values.
everytime I run pod. I tried to work around this error, I’ve deleted and reinstalled all pod files as well but no luck.
Wondering if anyone found a solution for this ?
6
Answers
Happy update! reanimated 2.10.0 is released now, and it appears to have the required patch according to a timely comment from @Lauri-Harpf – 2.10.0 also contains pre-built libs (as required by reanimated 2.x) for react-native 0.70.x so this answer is largely obsolete, but in a good way. Go grab the new release and give a star to the repo + support Software Mansion if you can, as they do a great job on the module. Cheers
Mostly obsolete answer follows:
react-native 0.69
It appears the answer is to update react-native-reanimated in order for it to be more compatible with react-native 0.69
There is not an official release with it for react-native 0.69 (for react-native 0.70 see below), but patch-package may be used to integrate a fix as described here:
https://github.com/software-mansion/react-native-reanimated/issues/3326#issuecomment-1225057452
(basically, you forcefully alter the C++ language standard reanimated uses by altering it’s podspec file to be the one Hermes wants, using patch-package to do the whole thing cleanly.
react-native 0.70
For react-native 0.70, you need to use the 3.x versions of react-native-reanimated, which do not have an official release as of this writing.
You do that by installing the
react-native-reanimated@next
version, for example asyarn add react-native-reanimated@next
, thenpod install
and the error should be gone.Simple Answer is
Just set the CXX n the podspec.
Change to:
Credits => https://github.com/Shopify/react-native-skia/issues/405#issuecomment-1244302303
I just needed to update to reanimated to v3.0.0-rc.3
I came across this error by installing:
React-Navigation does not mention any support yet for Animate V3 or Animate (next).
And as far as I heard, there is some major change on how Animate works behind the curtons (v2 and v3)
So I changed like mentioned in the post above the c++ version, made with patch-package a patch, and build the react native apps for android and iOS like mentioned on the react-native docs.
And I can confirm everything worked just fine.
I didn’t know at this point in time how patch-package worked, here some video in case you might also be new to this:
https://www.youtube.com/watch?v=2AVs-Yh1bS8&t=3s&ab_channel=BenAwad
Fixed for expo eas build on SDK 46 by updating to reanimated
2.12.0
Still throws error regarding CLANG_LANGUAGE_STANDARD and CLANG_LIBRARY for ["Reanimated" , "hermes-engine"] but not anymore for ["RNReanimated", "Reanimated", "hermes-engine"].
The build was crashing on startup in testflight, but does not do that anymore.
FWIW, in case you use Expo with expo-dev-client, expo-dev-menu pulls in a bundled react-native-reanimated. This is where the error is coming from in my case. It should be fixed, but at least a fresh Expo project I created yesterday still sports the issue, so the fix must not be released yet. The warning/error is gone after patching the podspec.