Automatic ToolbarItem placement hides the Add Button in XCode's App project template

Here is the default code of the SwiftUI project template in XCode 12.0.1

Code Block swift
   var body: some View {
    List {
      ForEach(items) { item in
        Text("Item at \(item.timestamp!, formatter: itemFormatter)")
      }
      .onDelete(perform: deleteItems)
    }
    .toolbar {
      #if os(iOS)
      EditButton()
      #endif
      Button(action: addItem) {
        Label("Add Item", systemImage: "plus")
      }
    }
  }


By default, the Edit button and the Add Item button don't appear on the preview. I have to wrap the List in a NavigationView before the Edit button appears.

Code Block swift
   var body: some View {
    NavigationView {
      List {
        ForEach(items) { item in
          Text("Item at \(item.timestamp!, formatter: itemFormatter)")
        }
        .onDelete(perform: deleteItems)
      }
      .toolbar {
        #if os(iOS)
        ToolbarItem(placement: .automatic) {
          EditButton()
        }
        #endif
        ToolbarItem(placement: .automatic) {
          Button(action: addItem) {
            Label("Add Item", systemImage: "plus")
          }
        }
      }
      .navigationTitle("Main List")
    }
  }


I've wrapped the buttons in ToolbarItems so that they can be positioned. At this point, the Add Item button is still not visible on the screen. It's only if I change it to something like

Code Block
ToolbarItem(placement: .principal)


that it would be visible.

Any leads as to why the automatic positioning is hiding the Add Item button?
I have this same problem in a macOS project. It seems if there are multiple items with .automatic placement, all but one are hidden. This seems to be either a bug or undocumented behavior. The documentation is highly unreliable. Some placement options like .navigationBarLeading and .navigationBarTrailing are stated to be available in macOS 11.0+ but the compiler produces an error ("'navigationBarLeading' is unavailable in macOS") when used. And using .principal placement usually has a runtime error and crashes.

Any help out there?
Automatic ToolbarItem placement hides the Add Button in XCode's App project template
 
 
Q