I have many enum classes in kotlin, but one of the...
# ios
p
I have many enum classes in kotlin, but one of them fore some reason started crashing on iOS:
Copy code
object CallFeature {
    data class State {
        enum class Status {
            Calling,
            Incoming,
        }
        enum class ViewPoint {
            Both,
            Self,
            Partner,
        }
    }
}
[SharedMobileCallFeatureStateViewPoint partner]: unrecognized selector sent to instance 0x28325adc0. It happens both when I try to compare
viewPoint == .parent
or making a
switch
I can’t seem to find any diffs with other enums at the same level - those are working well Have anyone faced something similar?
n
p
in my case call’s done on the main thread, but I’ll check out if 1.4.30 fixes it, thanks
no, 1.4.30 doesn’t solve this. looks like it’s an other issue - it crashes every time, not 50/50 like in this author case, and also crashes from the main thread. I don’t know how to create a sample project, because all other enums work fine🤔
ok I’ve found the problem, in case someone else seeing it - don’t use
Self
as a enum case.
👍 1