# multiplatform


10/03/2023, 10:22 AM
Hi all. I'm researching Kotlin Multiplatform for an upcoming project. I want to share business logic across 3 existing apps on three different platforms - Android, iOS and web (VueJS). I've followed this tutorial for creating a basic multiplatform library. Now I want to integrate this library into the 3 apps, but I'm unsure how. Is there a blog post, video tutorial etc that covers this for all three platforms? Thanks!

Alejandro Rios

10/03/2023, 1:09 PM
just found this article to integrate a KMM module on iOS, fresh from the oven 😂
👍 2


10/03/2023, 1:10 PM
Are the consumer Apps also using the kotlin multiplatform plugin or not? - if not using the kotlin multiplatform plugin is a bit more challenging but if using the kotlin multiplatform plugin is a matter of pushing the library to a maven repo and just add the dependency on the client App.


10/03/2023, 2:19 PM
How do your iOS teams expect to consume 3rd party libraries currently? Swift Package Manager (SPM) is most likely the front-runner but Cocoapods is also pretty common. If you want to publish your code as a binary framework then I would. suggest you take a look at Touchlab’s KMMBridge tooling


10/03/2023, 2:47 PM
thanks @Alejandro Rios. Do you know of a similar tutorial for web apps? e.g Let's say I have an existing web app written in VueJS, and I want to create a Kotlin Multiplatform library, then use the library's methods from my web app. How would I go about that?
thanks for the resource @psh. Ideally SPM, but Cocoapods would work too. I'll have a look into it


10/03/2023, 3:29 PM
@Graham for Kotlin/JS output, you may look at this post where I have tried to define all options to distribute and integrate the lib
👍 1

Akshay Agrawal

10/03/2023, 3:31 PM
just found this article to integrate a KMM module on iOS, fresh from the oven 😂 (edited)
@Alejandro Rios When trying to integrate cocoapods in a kmm module i am getting the following error:
org.gradle.internal.exceptions.LocationAwareException: Build file '/Users/IdeaProjects/multiplatform-lib/build.gradle.kts' line: 1
Plugin [id: 'org.jetbrains.kotlin.native.cocoapods'] was not found in any of the following sources:
Anything i am missing ?


10/03/2023, 3:44 PM
much appreciated @shaktiman_droid