Rafs
10/31/2023, 7:38 PMPablichjenkov
10/31/2023, 7:41 PMshared
library code, this interface will be implemented in Swift. Then you pass the swift implementation to shared
. And you avoid all the steps in the page above.Rafs
10/31/2023, 7:45 PMPablichjenkov
10/31/2023, 7:47 PMRafs
10/31/2023, 7:48 PMPablichjenkov
10/31/2023, 7:54 PMimport SwiftUI
but it shouldn't be a problem to import AnyLibrary
Mofe Ejegi
11/17/2023, 1:09 PMRafs
11/17/2023, 5:28 PMcommonMain
I have an expect platform module where I supply all the bridges
expect fun platformModule(analytics: Analytics): Module
KoinApplication.shared.initialize(analytics: AppleAnalytics())
Mofe Ejegi
11/17/2023, 5:32 PMRafs
11/17/2023, 5:33 PMonCreate
override fun onCreate() {
super.onCreate()
startKoin {
androidContext(this@App)
modules(
modules = appModule(analytics = AndroidAnalytics()),
)
}
}
appModule
fun appModule(analytics: Analytics) =
listOf(useCaseModule(), screenModules(), platformModule(analytics))
Mofe Ejegi
11/17/2023, 5:35 PMplatformModule
I'd steal that 😛Rafs
11/17/2023, 5:36 PM