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
Michael Paus
07/06/2024, 8:38 AM
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
Rok Oblak
07/06/2024, 8:57 AM
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
Michael Paus
07/06/2024, 2:05 PM
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
AigleZ Dev
07/06/2024, 4:18 PM
So basically I need to find an IOS library like POI