https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
s

Sebastien Leclerc Lavallee

07/05/2020, 4:31 AM
Hi! I’m trying to create an archive of my iOS project to upload to AppStore but I get this error:
ld: bitcode bundle could not be generated because '/shared42/build/cocoapods/framework/shared42.framework/shared42(result.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build file '/shared42/build/cocoapods/framework/shared42.framework/shared42' for architecture arm64
I was using the
packForXcode
task way before (with embedding the .framework directly, working fine) but now I moved to cocoapods way and I get this error. How do we enable bitcode ? Thanks!
s

svyatoslav.scherbina

07/08/2020, 11:08 AM
It seems that you are getting debug variant of Kotlin framework. Can you share your Gradle build script? Do you use custom build configurations in Xcode project?
s

Sebastien Leclerc Lavallee

07/08/2020, 1:57 PM
I reverted my changes and was able to publish to the AppStore. I’ll look into this later. But I did not use custom configuration in Xcode, but I did this in my shared project:
Copy code
if (iosPreset == presets.iosX64) {
                      embedBitcode("disable")
                  } else {
                      embedBitcode("bitcode")
                  }
And I removed that 🤔 that’s probably the case Thanks for the answer!