I now spent 2 days trying to create a Swift framework that includes a static (Objective-C) library, so I guess it is time to ask for help here...
My problem: I have a static library created with Objective-C and we need to release a framework that can be used by our customers to use the static library. Creating an Objective-C framework that wraps around the static library is no problem, but as many of our customers use Swift nowadays, it would of course be better if we can create a framework with a cleaned-up Swift interface that wraps around the static library.
What I tried so far (well, the only thing that at least compiled so far): I created a module.modulemap inside of the Objective-C header directory that defines a module so that I can reference it from Swift. But it seems the module is not compiled into the final framework and when I try to use it in a project on another computer (or move it to another directory), I get a "Missing required module" error because the header files are missing on that computer. And I of course do not want to provide the Objective-C headers in the Swift framework.
So my question: Is there a way to do this correctly? One possible solution would be to first create an Objective-C framework and then create a Swift wrapper framework around that Objective-C framework (at least I think that should work), but creating a Swift framework more directly would of course be much cleaner and nicer...
Thanks,