Automatically present WhatsNewView using SwiftUI Environment
mainTo enable automatic presentation, add the .whatsNewSheet() modifier to your view hierarchy. The view will automatically retrieve and present the appropriate WhatsNew object from the WhatsNewEnvironment provided in the environment.
struct ContentView: View {
var body: some View {
NavigationView {
// ...
}
// Automatically present a WhatsNewView, if needed.
.whatsNewSheet()
}
}