Inherit&expose public api from static lib dependency.

Hi everyone, I have to build a framework that has a staticLib as dependency. In the same time I want to use some classes from staticLib via framework's public api and it isn't accessible even if I import framework - I tested with otool and nm tools and the symbols seems to be in framework but inaccessible.

How to make public classes from staticLib to be accessible from framework api ?

Any hint or advice would be welcome, thanks in advance.

Answered by koleanu in 705801022

Hi, I managed to solve it in the end, so , the solution that I found is to copy staticLib's .swiftmodule folder into the root of the universal framework

some.xcframework/Modules/
                        |- ios/staticLib.swiftmodule/$contentStuff
                        |- ios-simulator/staticLib.swiftmodule/$contentStuff

I leave this here and I hope it will be helpful for someone.

Accepted Answer

Hi, I managed to solve it in the end, so , the solution that I found is to copy staticLib's .swiftmodule folder into the root of the universal framework

some.xcframework/Modules/
                        |- ios/staticLib.swiftmodule/$contentStuff
                        |- ios-simulator/staticLib.swiftmodule/$contentStuff

I leave this here and I hope it will be helpful for someone.

Inherit&expose public api from static lib dependency.
 
 
Q