Here's the solution, via -> https://stackoverflow.com/questions/73422048/enable-undo-coredata-swiftui
@Environment(\.undoManager) var undoManager
// ...
var body: some View {
// ...
.onAppear {
viewContext.undoManager = undoManager
}
}
Post
Replies
Boosts
Views
Activity
Anyone knows if it's fixed in Ventura?
Does not seem doable in SwiftUI as of macOS 12. Will see what's announced in the next WWDC.