Hi ..... is there any way to make KMP lib with swi...
# multiplatform
a
Hi ..... is there any way to make KMP lib with swift code ? I want to write swift code in my lib but I don't have swift module but the one in the main app ?
b
I had the same use case for my library. There is a couple of ways how you can achieve this, but for me I only managed to make it work with swift klib plugin. You can check how this is used in Inspektify library here: https://github.com/BVantur/inspektify And here is a plugin: https://github.com/ttypic/swift-klib-plugin
🙌 2
d
I just posted about
swift-klib-plugin
too - I was using Cocoapods integration for this purpose, thinking it was the only way. This plugin makes it so much cleaner. I'm very happy to remove Cocoapods from my project - Cocoapods was always a high impact and complexity for this notionally simpler use case.
🙌 1
l
I will note with swift-klib-plugin that I've had good experiences on a Mac dev machine, but applying the gradle plugin makes the project sync fail on non-mac machines.
f
@Landry Norris it’s like the cocoapods plugin. It makes the project incompatible with non macOS/xCode environment. You can’t fix that, you need to created separate Gradle file or find a way to isolate the config.
l
A fix just got merged for sync failing on non-mac machines.
🙌 1