Hi Everyone, I have a project in Android and iOS w...
# multiplatform
d
Hi Everyone, I have a project in Android and iOS with 15 local dependencies, in Android we use modules which are part of the project and in iOS we use Swift package manager. we have a
core-library
in both android and iOS, we want to convert this into a KMM module and use the same on both iOS and Android as our journey of migration to KMM. as currently I saw we can only import as
.jar
in Android and
.framework
in iOS, is this true or can we have the complete module added to our project ?
b
Hi, what do you mean by wanting “complete module added to our project”? You can depend on the KMM module as a normal Android module with gradle and for ios the
.framework
file will provide you access to all the functions and classes defined in your common and iOS sourceSets. If you want to export your KMM code as XCFramework so you can import it with swift package manager into your xCode project, you can have a look at this article https://johnoreilly.dev/posts/kotlinmultiplatform-swift-package/ although personally I haven’t tried.
d
Awesome!, Thanks @borisdamato for a quick reply, this blog post is what I needed, cheers 👍
p
d
@ptsiogas Thanks a ton, this is absolute best, this is exactly what I was looking for.
👍 1
p
Although personally, I prefer this approach but you have to use cocoa pods https://www.notion.so/desquared/Share-KMM-module-with-iOS-via-Cocoa-pods-eaa7c717b83a4805af3dfc72d0e58ac1