Hi @semenchikus, i have same issue i have one python compiled dylib i need ti bundle this dynamic library inside my iOS framework. I hope you have faced same issue and got solution also kindly tell how to fix this issue.
Here is a bit of extra info that may be useful: Can't properly build a dynamic framework containing a static one · Issue #2618 · Carthage/Carthage · GitHub
Hey @simonpierreroy, thanks a ton, I was able to make things work with implementation only flag as explained. But I was wondering how would one go about asking XCODE to point to the ModuleMap of the embedded static library in a scenario where a developers wants to expose both.
For me I have a MyLib.a and headers (include/libA/.h include/libB/.h) and a module map (module MyLib) just defining these headers. I have a framework wrapping this squashed static library which has helper functions and a OOPS structure. If I were to expose both the raw functions of the library as well as the functions from the framework how do I do it ?
In the later I am able to build the .framework using Xcode and import it manually to the application. But when I create xcframework I get the error that the module MyLib is not found. And as per your explanation it is expected. How would I make Xcode understand the INCLUDE_PATH in such a case ?
Could you use a header phase to point to all the headers of the static archive (public section)? This could make them available in the XCFramework Header folder / module map?
What I am currently doing is to include a folder with headers along with the .xcframework.
/Package
-Package.swift
-Headers
-xcframework
Then, in the client app I add this package as dependency using SPM.
In my case, my 3d party dependency is a swift package, so my headers are .swiftmodule folders that need to be added to the Import Paths build setting. To make this a bit "automatically" I am accessing the folders where Xcode checkouts the Swift Packages using $(BUILD_DIR)/../../SourcePackages/checkouts
So my Import Paths have this value. You may want to use the same path for your ObjC headers.
This is not the best approach, since I am relying on Xcode checking out the SPM dependencies in the derived data, but it is the easiest one I have found to keep in sync my lib and the headers. When I update the deps of my framework, Xcode gets grabs automatically the new headers.
When Xcode allows dynamic linking of Swift Packages and SPM allows dynamic linking of dependencies I will do everything different.

