Xcode Framework with SPM dependencies has different behaviour if the dependencies are in Swift and objc

Hey,

I found a different behaviour when generating a binary that uses SPM dependencies in objc and swift.

I'm not sure if this is a bug or if it's the intended behaviour.


Imagine that I create an Xcode project with a framework called MyLibraryContainer.

This framework is closed source, so I will distribute this framework as binary.


If I add to my framework a swift library A as dependency with SPM, and distribute a binary of MyLibraryContainer.framework, everything just works, because it seems that the swift library A it's inside MyLibraryContainer.


But If I add to my framework an objc library B as dependency with SPM, and distribute a binary of MyLibraryContainer.framework, I get an error while importing MyLibraryContainer `Missing required module B`.

To work around this issue, I need to integrate both MyLibraryContainer and B into the new project to avoid the Missing required module B error.


Is this a bug, or is there any restrictions with xcode projects that contains SPM objc dependencies?


Thanks

Xcode Framework with SPM dependencies has different behaviour if the dependencies are in Swift and objc
 
 
Q