Open jkoutavas opened 2 weeks ago
Possible duplicates:
Despite the fact two other issues are closed, the workarounds provided there do not work because enabling modular_headers per dependency is not always an option that can be concidered.
As a workaround try to remove use_modular_headers
! from your Podfile and apply modular headers only to specific pods
In my case I needed to use modular headers for firebase related pods
pod 'FirebaseCore', :modular_headers => true
pod 'Firebase', :modular_headers => true
pod 'FirebaseCoreInternal', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true
worked for me
As a workaround try to remove
use_modular_headers
! from your Podfile and apply modular headers only to specific podsIn my case I needed to use modular headers for firebase related pods
worked for me
We did the same thing and that solved the issue with firebase, but we have another third-party package that is not accepting :modular_headers. So I thought it might be good just to open a general ticket on the subject.
Description
Podfile doesn't support
use_modular_headers!
directive, get an error at build timeSteps to reproduce
create a sample react native project
npx react-native init MyApp
adduse_modular_headers!
to the Podfile dopod install
Getting error as Redefinition of module 'ReactCommon' error in Xcode project when buildingReact Native Version
0.74.2
Affected Platforms
Build - MacOS
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://github.com/jkoutavas/RN-0-74-2-example
Screenshots and Videos
There's also a reference to this issue on stack overflow: https://stackoverflow.com/questions/78540513/react-native-pod-file-use-modular-headers-throwing-redefinition-of-module-reac/78630743#78630743