I was looking at the keyboard shortcut for clearing the favorites. When the favorites list is visible, the Core Data objects are updated (cleared) but the list does not update to an empty list. I tried adding a ‘try save’ after the batchUpdateRequest but no luck. Any idea how to propagate that change through to the UI so the list reflects the clearance immediately?
Hi @magnas
This might be a bug in SwiftUI and Core Data when updating the published property. A way to handle this would be manually telling the view to update by using objectWillChange.send(). This is just a workaround to manually update the state of the view. Usually, SwiftUI already does this under the hood.