I am grateful to MobileTen and eskimo for their suggestions and advice in this thread 🙏
MobileTen's three suggestions didn't quite fit my setup but the first one gave me confidence in the solution that I had been converging towards.
The best solution that I have been able to come up with is as follows:
Create a new dynamic framework DF.
Link DF to StaticLibrary with the -all_load linker flag.
Link App, DynamicFramework1 and DynamicFramework2 to DF instead of StaticLibrary.
The linking structure, in pictorial form, of this solution is as follows:
App
|--> DF1 --> DF --> SL
|--> DF2 --> DF --> SL
|--> DF --> SL
For a minimal but concrete Xcode project that demonstrates this setup, see here.
If somebody can suggest a better solution which does not involve housing the static library's symbols within a dynamic framework, I am open to it.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: