https://kotlinlang.org logo
#compose-ios
Title
# compose-ios
b

Ben Abramovitch

03/21/2024, 9:43 PM
I saw that in
androidx.lifecycle:lifecycle-common:2.8.0-alpha03
there's now Lifecycle stuff available for KMP. I can now see the
Lifecycle
items like
Lifecycle
,
LifecycleOwner
,
LifecycleEventObserver
in my common code. On Android I have
LocalLifeCycleOwner
to get the current LifecycleOwner but I don't have something like that in the iOS module? I tried adding
androidx.lifecycle:lifecycle-runtime:2.8.0-alpha03
in the iOS dependencies as well and no luck. What am i missing so I can get the LifecycleOwner on the iOS side?
i

Ivan Matkov

03/21/2024, 9:47 PM
It doesn't exist yet, even if you will get this var from some Google's alpha it won't be initialized. in Compose Multiplatform 1.6.10 it will be solved by handling OS events by compose itself and map it to lifecycle state
👍 1
b

Ben Abramovitch

03/21/2024, 9:49 PM
Oh, well that explains it then. Is there a rough idea of how far out that would be?
i

Ivan Matkov

03/21/2024, 9:50 PM
Working on that, first dev will be soon (most likely in ~2w)
b

Ben Abramovitch

03/21/2024, 9:52 PM
Awesome! I'll keep an eye on that. Thanks!
p

Pablichjenkov

03/21/2024, 10:35 PM
Can you also make the library available to Browser? When I throw the dependency in commonMain compiler complains about missing js target.
i

Ivan Matkov

03/21/2024, 10:47 PM
Yes, JetBrains will re-publish it for web targets too, it's already implemented
💯 4
🙌 6
p

Pablichjenkov

03/21/2024, 11:13 PM
Great to hear that 😃
6 Views