Hello everyone, ios build fails when using compose...
# multiplatform
b
Hello everyone, ios build fails when using compose multiplatform's navigation library org.jetbrains.androidx.navigationnavigation compose2.9.0-beta04 error: Failed to build cache for /Users/bheem.negi/.gradle/caches/modules-2/files-2.1/org.jetbrains.compose.ui/ui-uikitsimarm64/1.8.2/4e8cc6d5a6641927f049c4d6adfbaaa94afa62be/ui-uikitSimArm64Main-1.8.2. As a workaround, please try to disable compiler caches (kotlin.native.cacheKind=none) Also, consider filing an issue with full Gradle log here: https://kotl.in/issue No real overrides for FUN FAKE_OVERRIDE name:accessibilityScrollToVisible visibility:public modality:OPEN <> (this:androidx.compose.ui.uikit.utils.CMPAccessibilityElement) returnType:kotlin.Boolean [fake_override] java.lang.IllegalStateException: No real overrides for FUN FAKE_OVERRIDE name:accessibilityScrollToVisible visibility:public modality:OPEN <> (this:androidx.compose.ui.uikit.utils.CMPAccessibilityElement) returnType:kotlin.Boolean [fake_override] at org.jetbrains.kotlin.ir.util.IrFakeOverrideUtilsKt.resolveFakeOverrideOrFail( ) at org.jetbrains.kotlin.ir.util.IrFakeOverrideUtilsKt.getTarget( ) at org.jetbrains.kotlin.backend.konan.ir.OverriddenFunctionInfo.getBridgeDirections( ) at org.jetbrains.kotlin.backend.konan.lower.BridgesBuilding.lower( ) at org.jetbrains.kotlin.backend.common.ClassLoweringVisitor.visitClass( ) Tried workaround, "please try to disable compiler caches (kotlin.native.cacheKind=none)". It fails with errors. No real overrides for FUN FAKE_OVERRIDE name:accessibilityScrollToVisible visibility:public modality:OPEN <> (this:androidx.compose.ui.uikit.utils.CMPAccessibilityElement) returnType:kotlin.Boolean [fake_override] java.lang.IllegalStateException: No real overrides for FUN FAKE_OVERRIDE name:accessibilityScrollToVisible visibility:public modality:OPEN <> (this:androidx.compose.ui.uikit.utils.CMPAccessibilityElement) returnType:kotlin.Boolean [fake_override] at org.jetbrains.kotlin.ir.util.IrFakeOverrideUtilsKt.resolveFakeOverrideOrFail( ) at org.jetbrains.kotlin.ir.util.IrFakeOverrideUtilsKt.getTarget( ) at org.jetbrains.kotlin.backend.konan.ir.OverriddenFunctionInfo.getBridgeDirections( ) at org.jetbrains.kotlin.backend.konan.lower.BridgesBuilding.lower( ) at org.jetbrains.kotlin.backend.common.ClassLoweringVisitor.visitClass( )
๐Ÿงต 4
โž• 2
Sorry, still can't figure out what is required from me? @Chrimaeon @Alejandro Rios @Alexandra Gnimadi
c
Long code snippets should go to the thread in here.
๐Ÿ‘ 1
b
Aaahhhh! Got it, thanks
Untitled
a
@Bheem I resolved it by using navigation compose 2.9.0-beta02 with CMP 1.8.2. Also in my case I was using koin for viewmodel and I used 4.1.0-RC1 (if you are in this case it could help)
๐Ÿ‘ 1
๐Ÿ‘๐Ÿป 1
b
Thanks @Alexandra Gnimadi. Downgrading to 2.9.0-beta02 or 2.9.0-beta03 works. Question: Is a specific version of xcode required or can we use the latest version of xcode? I'm currently using 16.3 per the compatibility matrix. https://www.jetbrains.com/help/kotlin-multiplatform-dev/multiplatform-compatibility-guide.html
s
Godsend, had the same issue with 2.9.0-beta04 where it didn't work. Downgrading to 2.9.0-beta03 works wonders! Thanks~
๐Ÿ‘ 1
๐Ÿ‘๐Ÿป 1
c
you'll have to upgrade to compose multiplatform 1.9.0-beta01 if you want to use navigation-compose:2.9.0-beta04
๐Ÿ™ 1
s
Hi everyone, I'm experiencing iOS build failures despite using the version combination recommended in this thread. My setup: - Kotlin: 2.2.0 - Compose Multiplatform: 1.8.2 - Navigation Compose: 2.9.0-beta02 - KSP: 2.2.0-2.0.2 Following @Alexandra Gnimadi's suggestion, I'm using navigation-compose 2.9.0-beta02 with CMP 1.8.2, but I still encounter iOS compilation failures: Compilation failed: IR lowering failed at: CurrencySelectionBottomSheet.kt java.lang.Exception: IR lowering failed at: CurrencySelectionBottomSheet.kt The failure specifically occurs when using third-party Compose Multiplatform libraries, such as Calf UI components for date pickers. The same code compiles and runs smoothly on Android and Desktop. Build configuration: - Xcode 16.0 (per compatibility matrix) - iOS SDK 18.1 - Target: iPhone 16 Simulator Has anyone encountered IR lowering errors with Kotlin 2.2.0 + CMP 1.8.2, particularly when using third-party Compose libraries on iOS? The error appears different from the accessibility-related errors mentioned earlier in this thread. I've tried: - Clean builds - Clearing Gradle caches - kotlin.native.cacheKind=none - Pod cache clean + reinstallation Any insights would be appreciated!
cc @Bheem
s
update to cmp 1.9 beta or downgrade nav to 2.9.0-beta01
s
@skominas.ainis this didn't worked
Copy code
agp = "8.10.1"
android-compileSdk = "36"
android-minSdk = "24"
android-targetSdk = "36"
androidx-activity = "1.10.1"
androidx-lifecycle = "2.9.1"

kotlin = "2.2.0"
composeMultiplatform = "1.8.2"

navigationCompose = "2.9.0-beta01"
kotlinSerialization = "1.9.0"
ksp = "2.2.0-2.0.2"

koin = "4.1.0"
calfUi = "0.8.0"
s
Sorry to hear that, have you tried Christopher approach of upgrading to CMP 1.9.0 beta and navigation beta04?
s
Thanks, @skominas.ainis, the build error is resolved ๐Ÿ™Œ But the third-party date picker library I'm using is now crashing ๐Ÿ˜ข Issue - https://github.com/MohamedRejeb/Calf/issues/358
โค๏ธ 1
s
Ahh, you might need to fork the library then and play around with the versions to fix it
504 Views