Anyone familiar with this issue? Performing `linkD...
# compose-ios
d
Anyone familiar with this issue? Performing
linkDebugFrameworkIosArm64
against a library module with Compose/iOS:
Copy code
e: Module "org.jetbrains.compose.runtime:runtime-saveable (org.jetbrains.compose.runtime:runtime-saveable-uikitarm64)" has a reference to symbol androidx.compose.runtime/remember|-2215966373931868872[0]. Neither the module itself nor its dependencies contain such declaration.
...I've cleaned, removed all
.gradle
caches, checked that I'm only importing version
1.2.0-alpha01-753
, same result. Is there any known issue with the iOS
saveable
artifact?
l
I get the same. I stopped trying for device.
It should work fine on simulator.
d
Thanks for confirming @Landry Norris 👌 It feels wrong to raise a YouTrack against a Dev build; but @Dima Avdeev just in case you aren't already aware of this issue in latest
1.2.0-alpha01
☝️
Notably, when I include the library as project dependency to a Compose/iOS 'dev App' in the same Gradle workspace; everything works fine (yes, on device). It's only when trying to produce the standalone framework artifact that the issue arises. Maybe this has to do with being on an M1 (host being arm64 as well causing some tool-chain ambiguity)? @Landry Norris ☝️
d
Thanks, I will research that error!
Do you have reproduction sample project?
d
Hi @Dima Avdeev, I will DM you regarding repro project.
c
Were you able to fix this @Dima Avdeev? I’m facing the same issue with 1.2.0-beta02 and Kotlin 1.7.10
d
@cafonsomota I should have posted this earlier: the workaround to this for me was disabling caching for Kotlin Native.
Away from computer at the moment but I think the line in gradle.properties should be: kotlin.native.cacheKind=none
l
I can confirm that this worked for me too. Also keep in mind that for libraries (framework compilation), all Composable functions have to be private or internal in your iOS and shared code right now. You get a 'no such file for ...' error otherwise
d
@Landry Norris That sounds like it could become a problem for us... Do you have a reference to any issues for that and when it might be resolved?
l
Not sure. I know I've mentioned the no file for ... error here before. When Touchlab wrote an article about their Droidcon app, they mentioned this, and it worked when I changed all composables to internal. I'd figure this will be fixed prior to stable iOS release.
UIKit support is still experimental, and while the JB team is doing a great job implementing it, there's more functionality they seem to be prioritizing. I saw that popup support just landed for all skiko targets, which is cool, but no Popup method for iOS yet.
d
Thanks for the context
c
Thanks everyone! I have it now working 🙂
Well, it seems I’ve found another similar issue 😕. I’m using the precompose library, and I get the a similar error when compiling it for iOS (compose). I’ve tried to add it locally and update to the same kotlin/compose version but the error is the same - any idea about what I might be missing?
Copy code
e: Module "moe.tlaster:precompose" has a reference to symbol [ moe.tlaster.precompose.viewmodel.compose/viewModel|3127023112414170874[0] <- local Local[<TP>,0 | TYPE_PARAMETER name:VM index:0 variance: superTypes:[moe.tlaster.precompose.viewmodel.ViewModel] reified:true] ]. Neither the module itself nor its dependencies contain such declaration.
Inline functions are also not supported 🙂 - I’ve made it work by calling another one
w
Hi @cafonsomota I have the same problem with precompose and viewModel in iOS. Did you found a solution for it ?
156 Views