Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

How to observe SwiftData DB changes

How can one observe changes in the SwiftData DB? I'm aware that this is possible via Queries, but I need to fetch the data in background, so a query is not an option.

I'm aware of the ModelContext.didSave / .willSave notifications, but these don't work with iOS 17.

-> How can I observe changes to models of a certain type? I don't want to observe the whole database.

How to observe SwiftData DB changes
 
 
Q