Let's say I have the following enums:
enum UserState {
case LoggedIn(LoggedInState)
case LoggedOut(LoggedOutState)
}
enum LoggedInState {
case Playing
case Paused
case Stopped
}
enum LoggedOutState {
case Unregistered
case Registered
}
Is there a way to save UserState
to UserDefaults
?