promises icon indicating copy to clipboard operation
promises copied to clipboard

PromisesSwift cannot be integrated as a static library

Open thatjiaozi opened this issue 4 years ago • 4 comments

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?

thatjiaozi avatar Apr 06 '21 18:04 thatjiaozi

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

sregg avatar Feb 12 '22 15:02 sregg

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

sregg avatar Feb 12 '22 18:02 sregg

#181

faimin avatar Feb 13 '22 11:02 faimin

Easier fix:

pod 'PromisesObjC', :modular_headers => true

imekinox avatar Jul 29 '22 17:07 imekinox