What is the proper way to propagate a dynamic structure dependent on a static structure?

I am creating a closed source dynamic framework. It depends on the static structure of a third-party closed source.

I bind the static dependency structure with my project / framework target, as described in this Apple technology note :

enter image description here

In the same technology document, Apple mentions:

The purpose of the application is responsible for the implementation of all frameworks, including any framework on which other frameworks depend.

Therefore, I also provide my clients with a copy of the framework on which I am dependent. However, later in the same technical note, Apple (referring to the implementation of static libraries / frameworks) states:

Since the binary is a static library in these situations, applications cannot paste it into the application package.

... The library should remain in the "Link Binary with Libraries" section.

This is great - so I have clients connecting the dependency of the static structure, rather than embedding it, and everything works fine.

However, problems arise when my client needs the -ObjC linker -ObjC for other libraries that they use. This linker flag forces my (objective-c) static structure dependency to load all its classes twice, and the client sees repeating class logs everywhere in its console.

One possible solution here would be for the client to identify used libraries that need the -ObjC linker -ObjC , and instead specify the force_load flag for these libraries. But this solution also causes problems in the case of a client using CocoaPods, because CocoaPods overwrites any changes to its linker flags with -ObjC again with each pod install . Are there any other solutions / ideas for this problem?

PS I know that Apple's tech note from this also mentions:

Static frameworks do not support the way static libraries are shared.

but unfortunately my hands are tied to business constraints at the moment, and I have to include this static structure dependency.

+3
ios xcode cocoapods
Nov 09 '17 at 18:18
source share

No one has answered this question yet.

See similar questions:

125
When should we use “embedded binaries” and not “bound frames” in Xcode?

or similar:

106
Resistance iOS Static vs Dynamic frameworks
19
Creating a Distributed Static Library Using Cocoapods
6
Managing dependencies in static libraries using cocoapods
3
Automatically add dynamic library to embedded frameworks through Cocoapods
3
Propagation (correct) iOS structures with dependencies
3
Comparison of sizes of static dynamic libraries of iOS
one
How to use a dynamic structure inside a container?
0
Subfile contains wireframe or static library objects for which the subfile does not contain target objects
0
-force_load on cocoapods libraries
0
Weak link between the framework and the static library



All Articles