Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pod install error #54

Closed
amarkes opened this issue May 11, 2022 · 3 comments
Closed

pod install error #54

amarkes opened this issue May 11, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@amarkes
Copy link

amarkes commented May 11, 2022

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

@amarkes amarkes added the bug Something isn't working label May 11, 2022
@osamaqarem
Copy link
Owner

osamaqarem commented May 15, 2022

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)

@osamaqarem
Copy link
Owner

As a third solution, you can also patch React-Core.podspec in node_modules using patch-package.

facebook/react-native#29995

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.

@osamaqarem
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants