Trying to update to Compose 1.9.0 and CMP 1.9.0-be...
# compose-ios
t
Trying to update to Compose 1.9.0 and CMP 1.9.0-beta03, and having an issue building for iOS. It appears to me that the lifecycle-viewmodel-savedstate has not been built for iOS. See here: https://central.sonatype.com/search?q=lifecycle-viewmodel-savedstate most packages have the version of 2.9.2 , but the ios bits are 2.9.0-alpha6. And it will not build on iOS. Building with Kotlin 2.2.10. Thank you.
same 1
z
How are you including the dependency in your project? Google started publishing lifecycle-viewmodel-savedstate themselves for almost all platforms, so the 2.9.2 common dependency largely just redirects to the original androidx artifacts now.
t
I tried changing to the androidx versions, but same effect. Though I think now it is related to the cinterops procedure. I get this error when runing the gradle sync process for one of my modules that needs to wrap an iOS XCFramework:
Copy code
KLIB resolver: Could not find "org.jetbrains.androidx.lifecycle:lifecycle-viewmodel-savedstate" in...
If I comment out the cinterop section:
Copy code
val main by this.compilations.getting {
                val EverCommercePaymentsIosSdk by cinterops.creating {
                    defFile("${projectDir}/libs/EverCommercePaymentsIosSdk.def")
                    compilerOpts(
                        "-framework", "EverCommercePaymentsIosSdk",
                        "-F${projectDir}/libs/EverCommercePaymentsIosSdk.xcframework/${slice}/"
                    )
                }
            }
then that error goes away. But of course then the iOS target will not build at all. even more errors. So is it possible the compiler itself is calling out to this package, and cannot find the version it wants? This is Kotlin 2.2.10.
Update: I was trying different versions, and putting lifecycle back to 2.9.1 from 2.9.2 fixed my issue. So perhaps in the packaging of that lib? Kotlin 2.2.10, CMP 1.9.0-beta03, lifecycle 2.9.1 works for me. Thank you!