SwiftUI views in navigation stack pop back in iOS 15

On iOS 15 my app started to behave strangely: when showing alert, sheet or popover on views at least 3 levels deep in navigation stack (root view -> level 1 view -> level 2 view -> level 3 view) all views in stack reload and pop back to level 1 view.

Have no idea what causes that; on iOS 13 and 14 the app works just fine.

Any thoughts on that? Maybe someone faced the issue too?

I think I am facing this same issue. But I am having trouble getting a dummy example that reproduces the error. Could you post a dummy example for people to reproduce?

I tried with this example, and it works fine on iOS 15 :/


struct DetailView3: View {
  var body: some View {
    Text("Detail view 3")
  }
}

struct DetailView2: View {
  var body: some View {
    NavigationLink(destination: DetailView3()) {
      Text("Show detail view 3")
    }.navigationBarTitle("Detail view 2")
  }
}

struct DetailView: View {
  var body: some View {
    NavigationLink(destination: DetailView2()) {
      Text("Show detail view 2")
    }.navigationBarTitle("Detail view")
  }
}

struct ContentView: View {
  var body: some View {
    NavigationView {
      NavigationLink(destination: DetailView()) {
        Text("Show detail view")
      }.navigationBarTitle("Master view")
    }
  }
}

Did you ever find a solution for this? I'm seeing the same thing, and I can't find a way around it. You are correct that it's views that are 3 levels deep, and when I strip the code down to its bare minimum, it still pops the views no matter what.

SwiftUI views in navigation stack pop back in iOS 15
 
 
Q