Eugene Park
08/04/2022, 5:13 AMMap<String, String>
representation of a class's property names/values on Android/iOS.
In my commonMain, I define something like `expect fun getPropertyMap(object: BaseObject): Map<String, String>`Where I may pass in some subclass like class Child : BaseObject()
I was able to get this to work on Android, by using reflection, but am struggling with the iOS implementation. I have tried using the Kotlin platform.objc
package, but it does not seem to be able to get the property names
I also tried writing objective-c code in Xcode against the generated xcframework, but it also returns empty property list. I was wondering if anyone had some suggestions?Eugene Park
08/04/2022, 6:11 AMkotlinx.serialization
to work on the iOS side.
Previously, I had only registered the SerializationModule
in commonMain
, which threw some error on iOS side.
But creating the module in iOsMain
did the trick