Since Bridging, Headers are not supported in framework targets,
- I've tried to import OpenSSL headers in the framework umbrella header. But the headers need to be public and I don't know how to make them public. I've added the OpenSSL framework as a reference folder. So my question is how to make them public?
- Another approach I've been trying to add a file called "module.modulemap", which as the name implies creates a swift module that can be imported to be used by the framework. I can build my framework target successfully, but when I try to build my OSX Application which uses my framework, a swift error pops up saying that it cannot find the OpenSSL headers.
I've worked around this issue by adding to the OSX Application build settings headers search path, the path for OpenSSL headers it works. Not sure what is going on here, can someone explain why is this happening and a suggestion for best practice on how to achieve using swift with open SSL in a framework?
This is the contents of the modulemap file:
module OpenSSL [system] {
header "../OpenSSL/include/openssl/pkcs7.h"
header "../OpenSSL/include/openssl/objects.h"
header "../OpenSSL/include/openssl/ssl.h"
header "../pkcs7_union_accessors.h"
link "ssl"
link "crypto"
}