Is there any way to preview the toolbar for a macOS SwiftUI app? I can't figure out how to structure my preview to get it to display the toolbar items in a view. It does the right thing when actually running, but not in preview.
I’ve tried putting my preview in a NavigationStack
and even in a NavigationSplitView
(which is what the app does). I’ve tried specifying .previewDevice(PreviewDevice(rawValue: "Mac"))
as well. It won’t even show the toolbar in the live preview (where it runs outside of Xcode).