No such module error after changing product module name in a framework

I need to restructure and old ObjC framework and one of the main idea is to create and iOS project with different targets, each target comes with a different name and customizations for each client.
For instance:
Targets:

  • ClientASDK
  • ClientBSDK
  • ClientCSDK

Products:

  • ClientASDK.framework
  • ClientBSDK.framework
  • ClientCSDK.framework

What I would love to do is to modify the module name to make the import statement equal for each client, let's say import ProductSDK.
I've found that changing the product module name in Xcode could help.
On all the frameworks define module flag is set to YES.
I created a host app in swift and added the framework project as subproject, added dependencies etc.
Without changing nothing I was able to import ClientASDK in the host app and test some classes.

By changing just the module name the autocompletion doesn't recognize neither the new or the old module name.

By changing the module name and adding a custom module.modulemap file makes the autocompletion works but when I try to build the app I receive the error “No such module ProductSDK”.

framework module ProductSDK {
  umbrella header "ClientASDK.h"

  export *
  module * { export * }
}

Is there a way to achieve what I'd like to do?

I've added a small MVP showing the issue, dowloadable from my dropbox account:

Terms of Service

Privacy Policy

Cookie Policy