Hello, I have a question it's my first time using ...
# multiplatform
a
Hello, I have a question it's my first time using kotlin multiplatform, I have an app idea that involves reading excel files, i've already done that on kotlin with Apache POI, and now i want to make a multiplatform app that will target android and ios my question is will apache POI work ?
🚫 4
m
That’s the dilemma of KMP. As soon as you have to go native, which is the case when you want to support iOS, you are loosing all support from the Java platform. I.e., all parts of the Kotlin standard library which are only supported on the JVM and all external libraries which were readily available in the many Java repositories are gone. Even existing KMP libraries are not free from surprises, e.g., in Okio you will find out that the native variant doesn’t support creating ZIP files. Bad luck if your code depended on that.
r
But that's not a dilemma. You're not losing anything. He can keep supporting JVM libs on Android and decide what to do with iOS. He can then define a common abstraction and implement it with an iOS specific library on iOS and Apache POI on Android. Point is, you're not backing yourself in any corner by adopting KMP.
☝️ 3
m
Of course I did not mean “loosing” in the sense that your existing code does not work anymore. I just meant that you have to look for alternatives for libraries which are just available for Java. This can be a substantial work which easily gets overlooked in all this multiplatform euphoria. Once you have found a substitute for, e.g., iOS the whole effort start all over when you later want to add the web for example.
a
So basically I need to find an IOS library like POI
👌 2
h
Sometimes there aren't common solutions, this ecosystem is new and this use case is really hard to commonize, you can try and use LibreOffice, this might help https://github.com/CollaboraOnline/online?tab=readme-ov-file