In beta 6 of Xcode 12/Big Sur, I've been able to get this working on macOS simply by attaching this modifier to a List, like so:
var body: some View {
	List {
		/* Your list-populating ForEach goes here */
	}
	.onDeleteCommand(perform: { print("Delete command received!") })
}
A pitfall to look out for: I use .deleteDisabled() conditionally on each NavigationLink in my List, and that's ignored by .onDeleteCommand(), so I return early in the action if my disable condition is met.
The .onDelete() modifier on the ForEach respects .deleteDisabled() when I two-finger swipe on the Mac's trackpad, though.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: