Rafs
10/31/2023, 7:38 PMPablichjenkov
10/31/2023, 7:41 PMPablichjenkov
10/31/2023, 7:42 PMPablichjenkov
10/31/2023, 7:44 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
Pablichjenkov
10/31/2023, 7:56 PMPablichjenkov
10/31/2023, 7:58 PMMofe Ejegi
11/17/2023, 1:09 PMMofe Ejegi
11/17/2023, 5:14 PMRafs
11/17/2023, 5:28 PMRafs
11/17/2023, 5:29 PMcommonMain
I have an expect platform module where I supply all the bridges
expect fun platformModule(analytics: Analytics): Module
Rafs
11/17/2023, 5:30 PMKoinApplication.shared.initialize(analytics: AppleAnalytics())
Mofe Ejegi
11/17/2023, 5:32 PMRafs
11/17/2023, 5:33 PMonCreate
Rafs
11/17/2023, 5:33 PMoverride fun onCreate() {
super.onCreate()
startKoin {
androidContext(this@App)
modules(
modules = appModule(analytics = AndroidAnalytics()),
)
}
}
Rafs
11/17/2023, 5:34 PMappModule
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 PMmarkturnip
01/23/2024, 2:03 AM