https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
a

anubhav

11/03/2023, 5:28 AM
Hi, We have a android application (kotlin + compose) in production and we were looking ways to launch the same application in ios. I saw couple of examples in github. but all seems to have single module. could anyone help me with a structure for multi-module multiplatform app. Thanks in advance.
currently planning to compose multiplatform for sharing the ui as well.
p

Pablichjenkov

11/03/2023, 5:42 AM
Have fun with this one: https://github.com/chrisbanes/tivi
a

anubhav

11/03/2023, 5:48 AM
Thanks a lot @Pablichjenkov
👍 1
m

McEna

11/03/2023, 5:55 AM
There is a wizard for generating a project template: https://kmp.jetbrains.com/
a

anubhav

11/03/2023, 6:02 AM
Actually I am in processs of migrating our android application to Compose multiplatform. since it is multi-module I was kind of struck there are some choices to be made. either move all modules inside the shared module or each module has implementation for ios and android. Thanks @McEna
p

Pablichjenkov

11/03/2023, 6:14 AM
At the end pretty much everything is a module. Those repo you call "single module" are actually multi module.
shared
or
common
is an independent module from androidApp or jvmApp. And notice you can change the module names and it will still work. Here is another example perhaps less complex than tivi https://github.com/serbelga/Todometer-KMP/tree/main
a

anubhav

11/03/2023, 6:25 AM
thanks a ton @Pablichjenkov having a look.
b

brandonmcansh

11/03/2023, 1:31 PM
I also have a template I’m using as well
2 Views