Hello folks, do you know how to enable bitcode on ...
# kotlin-native
c
Hello folks, do you know how to enable bitcode on a staticlib?
k
my understanding is that it is on by default
c
And I also tried asking on #multiplatform a couple of weeks ago https://kotlinlang.slack.com/archives/C3PQML5NU/p1574956519274700?thread_ts=1574956519.274700
k
but I guess I am not producing static libs, so not sure how that applies in that case
c
my understanding is that it is on by default
At least on on frameworks, I had to use
binaries.framework { embedBitcode("bitcode") }
on Gradle to make it work
but there’s no equivalent for
embedBitcode("bitcode")
and Xcode refuses to compile my staticlib because it says it doesn’t contain the appropriate bitcode
k
the app I am integrating into requires bitcode, and I did not have to enable it in my kotlin framework
c
maybe I have to update my Kotlin version? 🤔
I’m assuming you have already tested your app in an actual device, right?
k
correct
🤔 1
a
Hello @Cristián Arenas! One can enable bitcode for the static library with a compiler flag
-Xembed-bitcode
or something like
Copy code
staticLib{
    freeCompilerArgs += ["-Xembed-bitcode"]
}
in the Gradle script. Including this parameter to the MPP plugin should be discussed.