we use Kotlin to share a library between Android and iOS.
We set up everything, but on iOS i need Bitcode enabled. After a research I found solution:
kotlin {
targets {
fromPreset(presets.jvm, 'jvm') {
mavenPublication {
artifactId = 'my-lib-name'
}
}
// Switch here to presets.iosArm64 to build library for iPhone device || iosX64 for emulator
fromPreset(presets.iosArm64, 'iOS') {
compilations.main.outputKinds('FRAMEWORK')
compilations.main.extraOpts '-Xembed-bitcode' // for release binaries
compilations.main.extraOpts '-Xembed-bitcode-marker'// for debug binaries
}
}
}
But the question is now, do I have and if yes, how do I separate between release and debug binaries and the specific flags? Can i simply add both flags without any drawbacks?
Maybe somebody can enlighten me thanks