Skip to content

[BUG] iOS26: Modern SwiftUI alert modifiers have timing issues with FlowStack navigation #104

Description

@bobkexit

Title

Modern SwiftUI alert modifiers have timing issues with FlowStack navigation

Description

Problem:
Modern SwiftUI alert modifiers (.alert(_:isPresented:actions:message:) and .alert(_:isPresented:presenting:actions:)) work with FlowStack but have presentation timing issues. Alerts triggered on pushed screens only become visible when navigating back to previous screens.

Expected Behavior:
Alerts should appear immediately when triggered, regardless of the navigation stack depth within FlowStack.

Actual Behavior:

  • Alerts work normally on the root screen
  • On pushed screens, alerts are triggered but not displayed until navigating back
  • The deprecated Alert API works correctly on all screens

Steps to Reproduce:

  1. Navigate to a pushed screen in FlowStack
  2. Trigger an alert using modern API
  3. Alert doesn't appear
  4. Navigate back - alert becomes visible on previous screen

Code Example:

FlowStack($coordinator.routes, withNavigation: true) {
    ProfileView(viewModel: coordinator.rootViewModel)
        .flowDestination(for: ProfileRoute.self) { route in
            screen(for: route)
        }
}
// These don't work with FlowStacks:
.alert("Alert", isPresented: $isShowingAlert, actions: { ... })
.alert("Alert", isPresented: $isShowingAlert, presenting: details, actions: { ... })

// Only this deprecated API works:
.alert(isPresented: $isShowingAlert) {
    Alert(title: Text("Alert"), ...)
}

Environment:

  • iOS version: iOS 26.0 (23A5308g)
  • FlowStacks version: 0.8.4
  • Xcode version: 26.0 beta 5 (17A5295f)

Workaround:
Using the deprecated Alert API which works correctly on all navigation levels.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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