-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swift and Modules #15
Comments
Not a clue. But if you can fashion a modulemap file manually could we not put that into the code generator itself or a build phase? I would need to read up on this before I could say anything halfway sensible! |
You could probably do something, though i'm still learning the details myself. fwiw, If i create a modulemap file containing
where DubrovnikModule.h just includes <Dubrovnik/Dubrovnik.h> then I can import that into Swift and it works, though the 'Dubrovnik' module then ends up containing all of the Mono stuff as well. (I imagine you could do something similar to create a 'Mono' module to avoid that, but I haven't tested that). |
I would ask on the Mono list. There is a separate project for building the Mono SDK for the mac |
Related to what i'm trying in #12:
In order to use ObjC frameworks in Swift frameworks, you need to have a module to import (frameworks not having bridging headers as applications do).
As it stands, the Dubrovnik frameworks aren't modules, and making them into modules has a few issues. e.g.
-Mono isn't modular either, so you can get 'non-framework header' type warnings from DBMonoIncludes.h when importing Dubrovnik
-you can't have '.' in the module name, so things like 'Mono.mscorlib' won't work.
I've got it to work by creating a local modulemap file that invents a module for each of the Dubrovnik .frameworks that I need, but it would be nice if there was something more official.
Any thoughts?
The text was updated successfully, but these errors were encountered: