google / promises

Promises is a modern framework that provides a synchronization construct for Swift and Objective-C.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PromisesSwift cannot be integrated as a static library

thatjiaozi opened this issue · 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?

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

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

Easier fix:

pod 'PromisesObjC', :modular_headers => true