Hello everyone do anyone know how to handle activi...
# compose-ios
d
Hello everyone do anyone know how to handle activity lifecycle in compose ios such as // onStart, onResume, onPause, onStop, onDestroy . Kindly assist
p
I have an interface called LifecycleDispatcher. This interface is implemented in Android using Activity Lifecycle in iOS UiApplicatio Lifecycle. When my composeApp starts, one of the constructor dependencies is this interface. I also supply this interface implementation as a koin dependency.
Oh I see you question in decompose channel, yes that is another alternative. Use a State management library that supports lifecycle already.
d
Alright Thank you so much, Pablichenko
p
You can check this article for guidance on how to pass/inject an interface implementation from platform specific code https://medium.com/@mofeejegi/calling-platform-specific-dependencies-in-kotlin-multiplatform-69dbc9a841a2
d
On it , thank you
👍 1