SwiftUI .onDelete not working on WatchOS

I'm building a standalone WatchOS app. I have tried implementing the .onDelete modifier to easily delete items in a list, and I get no warnings or errors in XCode. But swiping, both in the simulator and Live Preview, does not do anything.

This is tested both in XCode 11.6 with WatchOS 6.2, and XCode 12.0 beta 2 with WatchOS 7.

Am I missing something here?

Minimal example:

Code Block swift
struct ContentView: View {
    @State var names = ["Alpha", "Bravo", "Charlie", "Delta"]
    var body: some View {
        ScrollView {
            ForEach(names, id: \.self) { name in
                Button(action: {}) {
                    Text(name)
                }
            }.onDelete(perform: deleteItems)
        }
       
    }
    private func deleteItems(at offsets: IndexSet) {
        names.remove(atOffsets: offsets)
    }
}


doh, same problem in beta 3
And beta 4 too :(
Filed feedback FB8271731

It is my understanding that you need both a List and a ForEach, thus:

           List {
               ForEach(numbers, id: \.self) { name in
                   Button(action: {}) {
                       Text(name)
               }
               .onDelete(perform: removeRows)
           }

This works fine, except that, unfortunately, on WatchOS 8.1, it will **** up if you reduce the number of items to zero.

SwiftUI .onDelete not working on WatchOS
 
 
Q