I have an application developed for iOS and Androi...
# multiplatform
e
I have an application developed for iOS and Android natively. We have a monetary calculation that we intend to refactor by unifying it in KMM. My question is: How do you handle monetary values in KMM, considering that BigDecimal is not compatible? Thinking about a large project, I cannot use third-party libraries with low engagement.
d
We just have our own expect/actual class wrappers around BigDecimal and NSDecimalNumber
j
@Ewerton Pontini https://github.com/kendy/Kotlin-Native-BigDecimal is a drop-in replacement for java.math.BigDecimal for KMM on iOS. I've ported it from Android to iOS and it is production-ready - I use it in an app where it undergoes over 2000 unit tests.