Is there anyway at all, to show an onboarding screen at the launch of a SwiftUI document-based app, before the file picker screen appears?
What I can do now, is to show the onboarding screen AFTER user creates a new file, or opens an existing file, using UserDefaults
:
import SwiftUI
struct ContentView: View {
@Binding var document: AnyDocument
@State var onboarding: Bool
var body: some View {
if onboarding {
OnBoarding(showOnboarding: $onboarding)
} else {
// Normal document view
...
}
}
}