pod install error
Closed this issue · 3 comments
Bug
- when i try to use the command pod install in ios folder, it happens.
[!] The following Swift pods cannot yet be integrated as static libraries:
The Swift pod `RNImageColors` depends upon `React-Core`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
Couldn't install Pods. Updating the Pods project and trying again...
Command `pod install` failed.
└─ Cause: The following Swift pods cannot yet be integrated as static libraries:
The Swift pod `RNImageColors` depends upon `React-Core`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
Environment info
Library | Version |
---|---|
react-native-image-colors | 1.5.1 |
rreact | 16.13.1 |
react-native | 0.63.2 |
Steps To Reproduce
npm i --save -E react-native-image-colors@latest
cd ios
pod install
Reproducible sample code
n/a
Try adding this to the top of your podfile and see if it works for you (make sure you're on cocoapods 1.9.0. or later):
use_frameworks! :linkage => :static
For the long term solution, I would remove the above statement and upgrade to RN 0.64.1 or later.
mrousavy/react-native-vision-camera#144 (comment)
As a third solution, you can also patch React-Core.podspec
in node_modules
using patch-package.
in node_modules/react-native/React-Core.podspec
:
Add "DEFINES_MODULE" => "YES"
to s.pod_target_xcconfig
Though the safest solution remains upgrading RN as I dont have the full context about this issue. e.g. I don't know if the above could cause other issues in your project.
I'll close this issue for now since I didn't hear from you yet. But feel free to re-open it if my suggestions didn't work out for you.