How to create a swift SDK that can be maybe available through a framework?

At work we have a high modular environment. Which all dependencies of project CompanySDK are in other repositories throughout the company. Some of the dependencies are xcframeworks. I can`t for security reasons expose the dependencies or the xcframeworks to someones outside the my organization.

I want to create an SDK that hide those implementations, but include all the code needed by the SDK.

For example:

I want to create an CompanySDK for iOS that has FeatureA, FeatureB and FeatureC as dependencies.

CompanySDK must include FeatureA, B and C; so that someone using the SDK just need to add CompanySDK to its project.

I already know that for iOS I can`t have a xcframework inside another xcframework or a static library inside another static library.

Things that I tried:

  • Static Library;
  • XCFramework;
  • Change the modulemap to include all headers from other libraries;
  • Merge two frameworks with lipo tool -> it merges two distinct frameworks well and I can use, but whenever I merge a framework that depends on other framework I get: "Failed to build module XXXXX for importation due to the errors above; the textual interface may be broken by project issues or a compiler bug" OR it doesn`t find the headers...

So, is there a way of achieving what I want? Maybe merging all dependencies xcframework/framework into a single one or change some Xcode configuration so that it imports the frameworks inside the xcframework? What are the best practices when creating a swift binary SDK?