Hello, my team wants to develop a KMP library as S...
# multiplatform
c
Hello, my team wants to develop a KMP library as SDK, so that we only have to write the business/API-interacting code once. That's set. But we don't know whether to • Only expose one KMP library for both AND and iOS targets • Or to have an internal (&public AND) KMP library and then an additional "wrapper" library for iOS, so that iOS library consumers don't have to care/know that we are using a KMP library with all that it entails (maybe using SKIE?). What is usually recommended to do in this case?
h
We have a "bridge" repo that has the business/API and it's a KMP project separate from the native iOS and Android, so for Android we publish it from Google artifatory, for iOS we consume it as an SPM that the GitHub actions push build and deploy also on Google artifatory So far works good as when changes need to be made, iOS folks also participate
r
you can create a common KMP library for all platform which include ios, android, web, desktop we have use this approach in our organisation
c
I guess if your company is the only user of the library, it doesn't matter that much. But in our case we want to provide the KMP library as SDK for other companies/developers, and we think the situation changes then. Those people might have a native iOS app and don't want to deal with KMP limitations
f
My main issue about distributing a library with kmp is the documentation for iOS , currently it’s not great at all
KMP can’t give the same level of quality as swift code documentation
🫠 1
s
We have the same discussions. We try to have our KMP code documented with kdoc as much as possible. But if we have a wrapper library, all our kdoc won't be shown and we will need to add it to the wrapper also. Which is double work for that part.
👍 2