google / google/promises

PromisesSwift cannot be integrated as a static library

Open
#168 4 comments 6 reactions 0 assignees View on GitHub
Dominant language
Objective-C
Stars
3.8k
Forks
316
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.