Sidebar on macOS?

I’m loving the SwiftUI 2.0 stuff, but I have a couple of questions.

First , I created a new project using the multi platform template. On iPad, the sidebar seems to work as I would expect, but I thought I saw in the presentation that I can have a sidebar in the macOS app as part of the template, but I don’t see that in the built app. I don’t see anyplace where the sidebar is explicitly added for iPad, so I’m wondering what I’m missing that’s preventing it from showing up in macOS. I’m seeing a full window textEditor, but the video seems clearly to be showing a default window with a sidebar.

second question- i haven’t seen any documentation on how to MODIFY the sidebar. Can anyone point me to that? I’m looking to add additional categories to the sidebar for documents that are coming from coredata in addition to the files that are stored, but I’m sure there are other use cases for modifying the sidebar in addition to this.

thanks in advance!
Sidebar is just a List with the listStyle of SidebarListStyle applied to it, like this:
Code Block
List {
/* ... contents of the sidebar ... */
}
.listStyle(SidebarListStyle())


You can use NavigationView to display the sidebar side by side with your app's content:
Code Block
NavigationView {
Sidebar()
MainContent()
}


Sidebar can be customised in any way you like, it's a simple SwiftUI List.
Thanks for your reply,

I guess I'm using the wrong terminology for my question. While I'm looking forward to the sidebar within the document window, I'm specifically asking about the ability to customize the sidebar that the user uses to browse for documents. I'm trying to figure out whether I can add an alternate data source (like a CloudKit database for example) into that file browser. Is that just a matter of writing a new file provider?

Thanks again.
Sidebar on macOS?
 
 
Q