ios – Can’t programmatically navigate again anymore in SwiftUI

[ad_1]

So mainly I’ve a easy view like so:

struct ContentView: View {
    @State var navStack = NavigationPath()
    @Atmosphere(.dismiss) var dismiss
    
    var physique: some View {
        NavigationStack(path: $navStack) {
            NavigationLink {
                Button {
                    dismiss()
                } label: {
                    Textual content("Pop Again")
                }
            } label: {
                Textual content("Element View")
            }
        }
    }
}

The issue is: after I faucet on the “Pop again” button within the element view, I get the next error message:

[Scene] Invalid try to name -[UIApplication requestSceneSessionDestruction:] from an unsupported machine.

I do not perceive why this error is occuring. It was working completely effective earlier than however I hold getting this error. I’m utilizing iOS 16 so I am unsure if there’s a bug.

What am I doing fallacious and the way can I repair it? Thanks!

Edit:

I created a contemporary undertaking with nothing however the view I’ve displayed above. I get the identical challenge.

[ad_2]

Leave a Reply

Your email address will not be published. Required fields are marked *