Distribute xcframework of a swift packages with local transient dependencies

I am developing a SDK and use SPM to modularise my code. All code is written in Swift.

My project structure is like this:

SampleApp (Workspace) -> SDK (SPM) -> ModuleA (SPM)

I can build and run the sample app locally successfully.

Now I want to archive/build the SDK package into a dynamic xcframework that my other clients can just drag and drop into their Xcode to consume.

I'm using xcodebuild -create-xcframework for that purpose and can successfully build a sdk.xcframework file.

But in a separated sample app where I embed the sdk.xcframework there, when import SDK module, I get this error

No such module 'ModuleA'

Failed to build module 'SDK' for importation due to the errors above; the textual interface may be broken by project issues or a compiler bug

I assume here, this is because the compiler can't find ModuleA

Is there anyway that I can bundle the ModuleA into sdk.xcframework statically, so that my clients can just drag only sdk.xcframework into their projects to consume the SDK module?

The question is pretty much: How can I bundle ModuleA and SDK into a single .xcframework for distribution

This isn't possible today, a single XCFramework can only vend a single module.

Thanks @NeoNacho for the response.

We use multiple local swift packages to modularise our project, which are used in both a main app and a SDK packages. This setup works great locally, but I'm looking for way to distribute the SDK package to other clients as well.

What would be a recommendation to distribute such a SDK which depends on multiple local swift packages?

I found this answer from you. Are those still the best ways we can do for this scenario?