Thread
#multiplatform
    t

    Travis Reitter

    7 months ago
    Is there any way I can further debug this issue? All the static libraries I'm including via
    cinterops
    seem to be built with bitcode (well, marker) as well as my KMM library and the app works as a release build but if I try to create the archive in Xcode, I hit this error:
    ld: bitcode bundle could not be generated because '/Users/treitter/doublestrain/DoubleStrain/SharedCode/build/xcode-frameworks/Release/iphoneos15.2/SharedCode.framework/SharedCode' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build file '/Users/treitter/doublestrain/DoubleStrain/SharedCode/build/xcode-frameworks/Release/iphoneos15.2/SharedCode.framework/SharedCode' for architecture arm64
    I get the same error whether or not I include
    embedBitcode("bitcode")
    in my
    framework
    block. This is with Kotlin 1.6.10 on an M1 Mac. This is the only thing blocking me from my first KMM-based release so any help is greatly appreciated! 🙂
    @wbertan @Marc Reichelt it looks like I have a potential fix: I just turned off Enable Bitcode > Release for my top-level Xcode project. My brief reading suggests the benefit of bitcode is symbol obfuscation but I'm not terribly concerned about that (your mileage may vary depending on your project). I suspect something about the more-fragile portions of my app may quietly be causing the original problem but I'm planning to replace them (and upgrade my other deps) over the next few months and I'll try re-enabling bitcode periodically.
    wbertan

    wbertan

    6 months ago
    Hey, sorry for late reply, was off the whole week 🌴 So, we are still discussing (as I was off we paused this), but will solve this week, but the initial approach will probably disable the Bitcode just for the
    Debug
    , since it is generating all right for the
    Release
    version.
    t

    Travis Reitter

    6 months ago
    @wbertan did it work out?
    I think it was disabled by default for me for Debug. I'm still not sure exactly why I can't just enable it. I'm guessing it's one of my dependencies but I can't tell which one
    wbertan

    wbertan

    6 months ago
    Yeah, basically the config in Gradle the default for Debug is MARKER and Release BITCODE, which we setting seems to do nothing. But we had enabled in our xcode project for both Debug and Release to have the Bitcode, then it was failing Archive in iOS because that. We disabled the Bitcode in xcode for Debug, but kept for Release. It is working fine, we did a release yesterday and all seems okay. From what I could see, doesn't seems to be a dependency, seems to be Kotlin 1.6 ignoring that config and using the default values - could not find anything in the release notes about this changing behaviour 🤔 could it be a regression issue?
    t

    Travis Reitter

    6 months ago
    I think I saw that suggested as a possible issue. I'm not sure if there's an additional reason it's not working for me. My plan is to just try it periodically to see if it's fixed