Is there a way to serialize/deserialize an Enum in...
# kotlin-native
t
Is there a way to serialize/deserialize an Enum in Kotlin/Native, without knowing the enums beforehand? I am looking for a way to save compose state but the data cannot contain an enum (see https://developer.apple.com/documentation/foundation/nsuseractivity/1411706-userinfo?language=objc).
Each key and value must be of the following types: NSArray, NSData, NSDate, NSDictionary, NSNull, NSNumber, NSSet, NSString, or NSURL.
The compose state can contain enums I am unable to access because they could be private. Is there any way to create an Enum instance in Kotlin/Native from e.g. a string? Any other suggestions are also appreciated how this could be done.
l
This appear to be a very apple-specific question.
You probably are emuch better off asking in #C9JM6Q2UX