Why is @Parcelize documented on the android docs b...
# android
v
Why is @Parcelize documented on the android docs but not on the official Kotlin docs?
z
It's an Android-specific plugin. Other platforms don't work with parceliing.
☝️ 1
v
Ah, what confuses me is that it is imported from kotlinx and not some android specific lib which led me to believe it had wider application
g
It's because Parcelize moved to Kotlin repo to simplify support of compiler plugin, so it kinda split between Kotlin (where code and support is) and Android (the only application of it)
l
That is, until this maybe becomes first party? https://github.com/arkivanov/parcelize-darwin
g
Curious about use case for it
l
@Arkadii Ivanov can probably tell us
a
Well, the use case was to allow saving state of an app on iOS as well, while keep using native Parcelize+Parcelable on Android. So I KMP-fied a bunch of interfaces and annotations, typealiased them to Parcelize/Parcelable on Android, and then created a compiler plugin for Darwin targets that generates the code and relies on NSSecureCoding. Until all of a sudden things broke in K2. That issue was eventually fixed, but I didn't have time to update parcelize-darwin because I already migrated all my libs to kotlinx-serialization.