I'm trying to use Compose/iOS with the `embedAndSi...
# compose-ios
d
I'm trying to use Compose/iOS with the
embedAndSignAppleFrameworkForXcode
method of integration. Is this not currently feasible? While linking during
embedAndSignAppleFrameworkForXcode
I'm seeing:
Copy code
ld: '/var/folders/pc/tjfqjw4s3rgcwbt0d8n2cbxr0000gq/T/included12460376748327750366/skiko-native-bridges-ios-arm64.a(BackendRenderTarget.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target.
I have disabled Bitcode for this target in the enclosing Xcode project. I've also passed
Copy code
iosArm64.binaries.framework { freeCompilerArgs = freeCompilerArgs + "-Xdisable-phases=VerifyBitcode" }
...to match the bitcode verification disable from the Falling Balls example (though that was done against executable target). Also tried setting
LD_BITCODE_ENABLE
to
NO
in Xcode project-level user-defined properties. I can see that environment variables passed to
embedAndSignAppleFrameworkForXcode
all specify no Bitcode... I'm running out of options. Any gotchas here?
l
Make sure to disable bitcode in all build gradle files for every iOS framework. This includes the one hidden in the cocoapods config block. I ran into this recently on a project with about a dozen modules. I forgot to apply it for one of the modules.
Have you taken a look at the Touchlabs Droidcon app? That one is known to build.
d
Thanks I'll check that. I have one Cocapod that is building from source and may need modifying to disable bitcode. Ive seen this pattern from Apple before where any trace of a feature usage implicitly forces it on elsewhere (SceneDelegate)... I wish they wouldn't do that. Also considered going to Xcode 14... Now that bitcode is deprecated maybe the build logic has already relaxed this? Good to know this is expected to work though, that's encouraging.
l
I'm not sure. I would hope that it's relaxed now, since enabling bitcode will be meaningless soon.
c
I’ve had a similar issue to this one when generating a watchOS app. I’ve added this compiler flags and the issue was fixed: `-Xoverride-konan-properties`: • https://youtrack.jetbrains.com/issue/KT-37368/Native-compiler-fails-to-compile-big-projects Not sure if it helps