Has anyone tried using Compose for iOS in a framew...
# compose-ios
l
Has anyone tried using Compose for iOS in a framework? I get the error in the 🧵 when I try to build an XCFramework that contains compose code. I made sure to apply the org.jetbrains.compose plugin.
Copy code
e: java.lang.IllegalStateException: No file for com.example.myframework.compose/MyComposable|-5223932365862523216[0] (@ com.example.myframework.compose/MyComposable|-5223932365862523216[0]) in module <MyFramework:ui>[ModuleDescriptorImpl@7077969c]
 at org.jetbrains.kotlin.backend.common.serialization.BasicIrModuleDeserializer.deserializeIrSymbol(BasicIrModuleDeserializer.kt:95)
        at org.jetbrains.kotlin.backend.common.serialization.IrModuleDeserializer.declareIrSymbol(IrModuleDeserializer.kt:74)
        at org.jetbrains.kotlin.backend.common.serialization.KotlinIrLinker.findDeserializedDeclarationForSymbol(KotlinIrLinker.kt:125)
        at org.jetbrains.kotlin.backend.common.serialization.KotlinIrLinker.getDeclaration(KotlinIrLinker.kt:167)
        at org.jetbrains.kotlin.ir.util.ExternalDependenciesGeneratorKt.getDeclaration(ExternalDependenciesGenerator.kt:57)
        at org.jetbrains.kotlin.ir.util.ExternalDependenciesGenerator.generateUnboundSymbolsAsDependencies(ExternalDependenciesGenerator.kt:44)
        at org.jetbrains.kotlin.psi2ir.generators.ModuleGenerator.generateUnboundSymbolsAsDependencies(ModuleGenerator.kt:52)
        at org.jetbrains.kotlin.psi2ir.Psi2IrTranslator.generateModuleFragment(Psi2IrTranslator.kt:92)
        at org.jetbrains.kotlin.psi2ir.Psi2IrTranslator.generateModuleFragment$default(Psi2IrTranslator.kt:75)
        at org.jetbrains.kotlin.backend.konan.PsiToIrKt.psiToIr(PsiToIr.kt:180)
        at org.jetbrains.kotlin.backend.konan.ToplevelPhasesKt$psiToIrPhase$1.invoke(ToplevelPhases.kt:120)
        at org.jetbrains.kotlin.backend.konan.ToplevelPhasesKt$psiToIrPhase$1.invoke(ToplevelPhases.kt:118)
        at org.jetbrains.kotlin.backend.common.phaser.PhaseBuildersKt$namedOpUnitPhase$1.invoke(PhaseBuilders.kt:96)
        at org.jetbrains.kotlin.backend.common.phaser.PhaseBuildersKt$namedOpUnitPhase$1.invoke(PhaseBuilders.kt:94)
        at org.jetbrains.kotlin.backend.common.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:96)
Is there a workaround for this? I remember that I got it working once, but the problem came back.
This happens during the linkReleaseFrameworkUikitArm64 task
d
l
I’ll take a look at trying that. The code is quite large (I’m taking existing Android Compose code and trying to run it on iOS to show what it will look like once Compose for iOS is ready), but I can comment out most of the UI code and see if I can get a Hello World running.
👍 1
I tried fully inlining content and now I’m back to just the bitcode error with skiko-native-bridges.