Skip to content

[BUG] iOS26: Deep back navigation causes infinite loop when using NavigationStack instead of NavigationView #103

@bobkexit

Description

@bobkexit

Title

Deep back navigation causes infinite loop when using NavigationStack instead of NavigationView

Description

When replacing NavigationView with NavigationStack in a TabView setup with FlowStacks coordinators, deep back navigation triggers an infinite loop, making it impossible to navigate back through the stack.

Repository Link

Full code available at: FlowStacks_Back_Bug_Navigation

  • Relevant file: LiquidGlass%2BFlowsStack/Root/TabBarView.swift

Current Code

TabView {
    ForEach(viewModel.tabs, id: \.id) { coordinator in
        Tab(coordinator.tabBarItem.name, systemImage: coordinator.tabBarItem.systemImage) {
            NavigationView {  // Works fine
                TabResolverView(coordinator: coordinator)
            }
        }
    }
}

Problematic Code

TabView {
    ForEach(viewModel.tabs, id: \.id) { coordinator in
        Tab(coordinator.tabBarItem.name, systemImage: coordinator.tabBarItem.systemImage) {
            NavigationStack {  // Causes infinite loop on deep back navigation
                TabResolverView(coordinator: coordinator)
            }
        }
    }
}

Expected Behavior

Deep back navigation should work the same way with NavigationStack as it does with NavigationView, allowing users to navigate back through multiple screens without getting stuck.

Actual Behavior

When attempting to navigate back through multiple screens (deep back navigation), the app gets stuck in an infinite loop and becomes unresponsive.

Environment

  • iOS: 26.0 (23A5297i)
  • Xcode: 26.0 beta 4 (17A5285i)
  • FlowStacks version: 0.8.4

Reproduction Steps

  1. Set up TabView with NavigationStack containing FlowStacks coordinator
  2. Navigate deep into a flow (multiple screens)
  3. Attempt to navigate back multiple levels
  4. App gets stuck in an infinite loop

This issue prevents migration from the deprecated NavigationView to the modern NavigationStack API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions