-
Notifications
You must be signed in to change notification settings - Fork 190
SwiftModule and -Swift.h ObjC compatibility header not copied to framework #175
Comments
As I said before, I haven't worked with Swift so can't give any advice here. |
@ruslo That's fine (regarding Swift usage). However, could you give me some pointers in how to find the name of these folders? Also unsure of how to work out the directory _builds/ios-toolchain/Foo/Bar.build/Release-iphoneos/Bar.build/DerivedSources If I can get some variable name for these, I could fix the create_framework.py script. So I guess the main things I would need is: |
I really don't know what all this is about :) The right solution would be to implement all this stuff in CMake itself and see what should go where. |
It already is in CMake and those are the generated files. |
Actually I think iOS framework creation is fixed in CMake. I see iOS mentioned here: I've tried simple example and it looks good. Need to try something with complex structure. @xsacha you can post your question to CMake bugtracker in this case. @headupinclouds +cc |
Works fine. Don't use |
This is great news, thanks! |
When building a framework that contains swift code, the generated framework is missing critical files.
When adding the swift code, a Foo-Swift.h file is generated so that Objective-C can call Swift functions. This is usually included in the framework.
Also, the Foo.swiftmodule file is usually included in the framework so you can use the Swift functions directly.
Location of these generated files, which are correctly generated by CMake:
_builds/ios-toolchain/bin/Release/Foo_0_0_0_0.swiftmodule/arm.swiftdoc
_builds/ios-toolchain/bin/Release/Foo_0_0_0_0.swiftmodule/arm.swiftmodule
_builds/ios-toolchain/bin/Release/Foo_0_0_0_0.swiftmodule/arm64.swiftdoc
_builds/ios-toolchain/bin/Release/Foo_0_0_0_0.swiftmodule/arm64.swiftmodule
This folder is meant to go in to the Modules/ directory of the generated Framework.
_builds/ios-toolchain/Foo/Bar.build/Release-iphoneos/Bar.build/DerivedSources/Foo_0_0_0_0-Swift.h
This file is meant to go in to the Headers/ directory of the generated Framework.
I am not sure how to do this myself.
The text was updated successfully, but these errors were encountered: