(KMP) allows developers to share core logic across multiple platforms (mobile, web, desktop), reducing redundant code and maintenance. It uses shared commonMain source sets for common code and expect/actual patterns for platform-specific implementations, enabling seamless integration with native APIs. X : @omooooori432
and iOS application. Inside App, call MapComponent that is expect. Need to implement Android and iOS specific code with actual annotation. You can create Koin di code if you need. (above appModule) @Composable fun App() { MaterialTheme { Scaffold { Column(Modifier.fillMaxSize()) { MapComponent() } } } } @Composable expect fun MapComponent() fun appModule(context: Context) = module { single<YourClass> { YourClass(get()) } } You can instantiate using koinInject() DI UI UI X : @omooooori432
code and set content. Set Google Map API Key using AndroidManifest. Refer MAPS_API_KEY from property file. class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContent { App() } } } X : @omooooori432
GMSServices.provideAPIKey("YOUR_API_KEY") } var body: some Scene { WindowGroup { ContentView() } } } Create entry App code for iOS application. Set API key here or create AppDelegate and set inside it. X : @omooooori432
Use actual/expect and write each specific code. But it is effective to use common business logic code. I am look forward to KMP becoming much popluar in the future. X : @omooooori432