Okay, here's what my app looks like.
@main
struct MemorizableApp: App {
init() {
FirebaseApp.configure() // Configure the FirebaseApp instance
Database.database().isPersistenceEnabled = true // Set DB persistence to true
}
var body: some Scene {
WindowGroup {
if Auth.auth().currentUser == nil {
SignInView()
.onOpenURL{ url in
GIDSignIn.sharedInstance.handle(url)
}
} else {
MainView()
}
}
}
}
And this is MemorizableApp.swift
. As you can see, the app starts in MainView. But I want the app to launch in NotebooksView instead. Obviously, changing MainView to NotebooksView in the code above won't work because 1) NotebooksView doesn't have a NavigationView in it, and 2) I won't be able to navigate back to MainView. But somehow Apple's Shortcuts app did exactly this without creating a custom back button. How can I achieve this behaviour?