5 ms·
"tried" being the operative word. But you really shouldn't be persisting an ObservableObject. You should extract what you need into a model and use Codable...
by emehex 4y ago
"tried" being the operative word. But you really shouldn't be persisting an ObservableObject. You should extract what you need into a model and use Codable...
- bowsamic 4y agoWhy shouldn't I try and persist an ObservableObject? Has some Apple guru given you this secret information in a WWDC, or personally? It seems totally reasonable to do so. Observability is something you bestow upon a model, it shouldn't exclude it from persistence. You are talking nonsense to defend Apple's lazy approach. They simply have not covered this base, that's the actual non-Apple-fanboy explanation. Get it together
- emehex 4y agoObservable/StateObjects help bridge between models and views... I'd recommend watching this WWDC session: https://developer.apple.com/videos/play/wwdc2020/10040/ https://developer.apple.com/videos/play/wwdc2020/10040/