Cocoapods: Can I mix frameworks and static libraries in a single target?

Created on 23 May 2018  路  1Comment  路  Source: CocoaPods/CocoaPods

Report

As best as I can tell from reading the documentation, there's no way to have a mixture of static library and framework source dependencies in a single target. It does seem to be supported if the pod contains a prebuilt binary (e.g. my current project has use_frameworks! but has at least one dependency that is just a prebuilt static library, and it works), just not for building from source.

Am I missing something here, or am I understanding this limitation correctly?

I'm asking because at least one of the pods I vend (probably 2 but I haven't confirmed) doesn't currently build as a static library (see #7771). It's a Swift dependency so until 1.5.0 it didn't matter as Swift dependencies required use_frameworks!, but now that static libraries are supported for Swift, I'm looking for a solution that will allow me to remove use_frameworks! from my downstream project while still using my pods (a solution that doesn't involve shipping a prebuilt binary).

If I am understanding this limitation correctly, then I'd request one of the following (ideally both):

  1. Allow me to specify in a pod declaration that it should use frameworks (or static libraries).
  2. Allow me to specify in a podspec that the pod only supports being built as a framework.

If I'm not understanding this limitation correctly and there is a way to declare one or both of these, then the documentation should be updated to describe how.

hard help wanted enhancement

Most helpful comment

Both of these asks are very valid and have been more or less discussed in various other places (including other issues).

Neither of them are a small change though.

>All comments

Both of these asks are very valid and have been more or less discussed in various other places (including other issues).

Neither of them are a small change though.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gerchicov-bp picture gerchicov-bp  路  3Comments

pallaviMN picture pallaviMN  路  3Comments

sonu5 picture sonu5  路  3Comments

evermeer picture evermeer  路  3Comments

steffendsommer picture steffendsommer  路  3Comments