anyone sharing model classes in KN between android...
# multiplatform
p
anyone sharing model classes in KN between android and iOS? Specifically for iOS, if we do this, there is a huge limitation where even if the object is created in Swift (model class resides in KN), we cant use that object from multiple threads How are you guys working around it? Freezing?
s
For sharing mutable (or late/lazily-created) state/data for iOS (native) from the shared Kotlin code, we use TouchLab's AtomicReference classes.
1
s
In most cases you don’t need to store mutable data, and so freezing works just fine