Post

Replies

Boosts

Views

Activity

Are enums with associated values supported by swiftdata in any real way?
I haven’t found any way to have a swift data model contain an enum with different associated values, each different types of models, in order to deal with models that require heterogenous collections. Is this simply not supported? Is it supported but not ever used with SwiftUI binding? Instead I’ve had to create my own sort of enum in the form of a model that contains optionals for every case but this is obviously not ideal.
2
3
1.3k
Jun ’23