I have a similar problem as this (unaswered) one: Swift app: “Missing required module” when importing framework that imports static library But my static library is not as a (sub)project, only linked to my framework which is together with an application in one workspace.
So what I need is to include OpenSSL in my framework so when I give it to someone, he doesn't need to link OpenSSL to his application because it is already included in my framework.
I built OpenSSL and have libcrypto.a, libssl.a and corresponding header files. I created modulemap to make this visible in my swift framework.
module COpenssl {
umbrella header "openssl.h"
export *
}
When I run tests on this framework everything works as intented.
But when I use my framework named 'lib' (import lib) in an application I get the error: Missing required module 'COpenssl'
I tried this command to check if OpenSSL is bundled into my framework:
$nm ./lib.framework/lib | grep SHA256_
0000000000096820 T external _SHA256_Final
0000000000096540 T external _SHA256_Init
0000000000097d40 T external _SHA256_Transform
00000000000966c0 T external _SHA256_Update
00000000001faf70 S external _SHA256_version
Based on this I assume that OpenSSL is there.
Why is the application trying to find COpenssl module when it doesn't need it?
XCode 8.0 (8A218a), Swift 2.3