#if targetEnvironment(macCatalyst)
// here use the NavigationView + NavigationLinks to make the sidebar on macOS
#else
// here use the Tab Bar view.
#endif
#if targetEnvironment(macCatalyst)
struct MyView: View {
var body: some View {
Text("Im in macOS")
}
}
#else
struct MyView: View {
var body: some View {
Text("Im in iOS")
}
}
#endif