How to use swift-only libraries from kmp library p...
# multiplatform
v
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?
v
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.
v
Yes, but this is not an ideal solution. As now consumers of my library need to also manually link with my wrapper library.
v
I didn't say it is ideal.
v
🙂
I thought that whole purpose of kotlin multiplatform is to be awesome / ideal 🙂 .
v
It is in beta