I have made an Objective-C Statically Linked framework by this tutorial for two years ago. Now I need to support Swift impot for my framework. What can I do?
import MySDK
I found a way to solve my problem.
Add a module.modulemap
file to your library project.
framework module MySDK {
umbrella header "MySDK.h"
export *
module * { export * }
}
And add the this script snippet to your Run Scripts
of Aggregate
target.
# Support module map
dst=${MY_FRAMEWORK_LOCATION}/Modules/
mkdir -p "${dst}"
cp "/Path/To/module.modulemap" "$dst"
The script snippet would add a directory and copy the module map file to your framework.