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

PromisesSwift cannot be integrated as a static library #168

Open
thatjiaozi opened this issue Apr 6, 2021 · 4 comments
Open

PromisesSwift cannot be integrated as a static library #168

thatjiaozi opened this issue Apr 6, 2021 · 4 comments

Comments

@thatjiaozi
Copy link

When creating an app that depends on pod 'PromisesSwift' and that uses static libraries,I get the following error:

[!] The following Swift pods cannot yet be integrated as static libraries:

The Swift pod `PromisesSwift` depends upon `PromisesObjC`, 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.

An example podfile for this would be the following:

source 'https://github.com/CocoaPods/Specs.git'

target 'CocoaPodsDebug' do

  # Comment the next line if you don't want to use dynamic frameworks

  #use_frameworks!

  pod 'PromisesObjC'
  pod 'PromisesSwift'
 
end

note that use_frameworks! is commented out, also if we add :modular_headers => true to pod 'PromisesObjC'` the error goes away.

The question is: are there any plans to make this work by default?

@sregg
Copy link

sregg commented Feb 12, 2022

@JJLionHeart did you find a way around that?
I'm also running into this issue when installing RecaptchaEnterprise.

@sregg
Copy link

sregg commented Feb 12, 2022

I fixed it by adding use_modular_headers! in my Podfile and adding :modular_headers => false to a bunch of pods

@faimin
Copy link
Contributor

faimin commented Feb 13, 2022

#181

@imekinox
Copy link

Easier fix:

pod 'PromisesObjC', :modular_headers => true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants