Setup
I create a swift framework which include C library (CommonCrypto) and a Objective C file.
There is no bridge-header in swift project. So I create a
module.modulemap
to import CommonCrypto and Objective-C file into my swift framework.module.modulemap content:
Here is the module.modulemap sample link:Importing CommonCrypto in a swift framework
In project settings, adding modulus.modulusmap path to swift compile
So, in my swift framework, everything works fine. I can use modulus like this
Problem shows
Archive the modular framework and export as a built products.
In my swift sample project, add modular framework to Embedded Binaries
Error occurs on this line when I use something inside the framework
I have try so many solutions, but still not work.
Similar problems:
Swift app: “Missing required module” when importing framework that imports static library
Adding RealmSwift as a subproject: Missing required modules: 'Realm.Private', 'Realm'
Is anyone have a good solution for this? Thx!!