In Persistence.swift check static var preview starting line 13. Over there the following code segment creates the ten record.
	 for _ in 0..<10 {
	 let newItem = Item(context: viewContext)
		newItem.timestamp = Date()
	 }
You can adapt it to accommodate to your own needs.
Otherwise you have got the option not to use the preview context by simply not using it in ContentView.swiftat the very end of the file.
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView().environment(\.managedObjectContext, PersistenceController.preview.container.viewContext)
}
}
Post
Replies
Boosts
Views
Activity
In fact there was no crash, it was a breakpoint it I was not aware of. Sorry.
The rest of the question remains.
Thank you!
The answer – or at least part of it – might be in today's release notes for 11.0.1:
Known IssuesA ToolbarItem with automatic placement isn't placed in the window toolbar. (63690384) I guess it is just not ready.