Post

Replies

Boosts

Views

Activity

SwiftData: Is syncing changes across ModelContext’s working in Beta 1?
If I make model changes in the mainContext using a batch operation like context.update OR on a background thread ModelContext ModelContext(container), my saved changes are not automatically reflected in the UI (a List of models). Also ModelContext.willSave and ModelContext.didSave don't seem to get called. Will automatic UI updates work in an upcoming Beta but are NOT in Beta 1? Or will we refresh View/@Query based on a ModelContext.didSavenotification? Or should this be working in Beta 1 and I am missing how it works?
4
0
3.1k
Jun ’23