Issue building mixed.framework
asa opened this issue · comments
How are you actually getting a .framework file out of this example? The Mixed example from https://github.com/line/bazel_rules_apple/tree/master/examples/ios/Mixed doesn't push out a Mixed.framework. it compiles to a libMixed.a and the folder its in is not importable as Mixed.framework
guidance on how to get an importable framework would be great. Thank you.
You need to build the MixedFramework target. So bad the target name is hidden behind the macro. I’ll add some guidance about it. Or if you can contribute it, it’d be awesome :)
Ok, that builds. But I am not able to import SwiftGreeter
in an xcode project that has the framework imported.
I unzipped MixedFramework.zip and ended up with Mixed.framework. Dragged that into xcode project, made sure it was set to embed and sign, add import SwiftGreeter
to a ViewController.swift and get : No such module 'SwiftGreeter'
Ok, this works now. I had to build with --apple_bitcode=embedded --copt=-fembed-bitcode
and then import Mixed
into the view controller.
and then Mixed.SwiftGreeter.sayHi(name: "So hello....")
works!
Ah yeah, if you compile with bitcode in your project, then you would have to do the same for the prebuilt framework.
It’s a static framework — don’t embed it.