I've an xcframework with Swift & ObjC classes. I've a private modulemap for connecting between ObjC and Swift internal classes. I can create an xcframework manually or through SPM or Carthage, and install it in app and everything will work fine. The modulemap:
module MySDK_Private {
header "./Path/To/My/Internal/ObjC/Header/FileName.h"
export *
}
But, when I'm trying to do so with Cocoapods, it doesn't work. I've try to add this modulemap through the podspec (s.module_map = 'module.modulemap') and It fails on the auto generated modulemap:
// My code:
module MySDK_Private {
header "./Path/To/My/Internal/ObjC/Header/FileName.h"
export *
}
// next code is generated by the cocoapods scripts:
module MySDK.Swift {
header "MySDK-Swift.h"
requires objc
}
with this error message: No module named 'MySDK' found, parent module must be defined before the submodule
What am I doing wrong?
How can I add this framework into app with cocoaPods?