How to use swift-only libraries from kmp library project?
In the kmp app project i can use dependency injection, implement kotlin interface in swift and pass it on.
But in kmp library project i do not have an xcode project where i can do this.
How kmp library authors add dependenices on swift-only libraries?
10/17/2023, 8:44 AM
You create your own library, which implements a wrapper to communicate with swift only 3rd library and opens obj-c compatible interface for the KMP.
From KMP part you use that wrapper.
10/17/2023, 9:15 AM
Yes, but this is not an ideal solution. As now consumers of my library need to also manually link with my wrapper library.
10/17/2023, 9:16 AM
I didn't say it is ideal.
10/17/2023, 9:17 AM
I thought that whole purpose of kotlin multiplatform is to be awesome / ideal 🙂 .