Interface is not propagated when using mergeable libraries

Hi!

I've been dealing with mergeable libraries quite some time. However I can't achieve the following scenario:

I have 2 xcframeworks A and B that are merged as part of a third xcframework called C. And my app needs to import something from A and B.

As per the documentation we have to remove the references from A and B from the final app and replace it with C. If I work on the same xcodepoj it works like a charm (maybe because of caches), but if I try to compile C as a separate XCFramework and distribute it as a packed library, the app is not able to resolve the symbols to A and B classes.

This C xcframework is compiled with BUILD_LIBRARY_FOR_DISTRIBUTION se to true and if I check its swiftinterface files it is not declaring the symbols from A and B. However the size of the binary seems to have A and B.

Is there any way to export A and B symbols as part of C's swiftinterface? If I add @_exported, it is forcing me to declare the import of A and B wherever I use them and therefore I'm going to have duplicated symbols

Thanks!

Answered by Engineer in 792198022

Hi,

At this time there's no ability to merge Swift interface files. There's also no support for packaging together and re-exporting modules. If that's feasible for your use case, you might want to experiment with manually packing Swift interface files for the merged frameworks and setting up app project to pick them up, for example using the SWIFT_INCLUDE_PATHS build setting.

Have you managed to find a solution to this?

Hi,

At this time there's no ability to merge Swift interface files. There's also no support for packaging together and re-exporting modules. If that's feasible for your use case, you might want to experiment with manually packing Swift interface files for the merged frameworks and setting up app project to pick them up, for example using the SWIFT_INCLUDE_PATHS build setting.

Interface is not propagated when using mergeable libraries
 
 
Q