Skip to content

Why does it affect the NavigationStack on iOS 26 beta 2? #186

@jey-song

Description

@jey-song

The following code causes push notifications to fail on iOS 26 beta 2:

Device: iPhone 16
version: iOS 26 beta 2

import SwiftUI
import PartialSheet

struct ContentView: View {
    @State private var path: [String] = []
    
    var body: some View {
        ZStack {
            NavigationStack(path: $path) {
                VStack(spacing: 20) {
                    Text("👋 Welcome")
                        .font(.title)
                    
                    Button("Go to Detail (path.append)") {
                        print("append route")
                        path.append("detail")
                    }
                    .buttonStyle(.borderedProminent)
                }
                .navigationDestination(for: String.self) { route in
                    VStack(spacing: 16) {
                        Text("✅ Detail View")
                            .font(.largeTitle)
                        Button("Go Back") {
                            // intentionally left blank
                        }
                    }
                    .navigationBarTitleDisplayMode(.inline)
                }
                .navigationBarHidden(true)
                .navigationBarBackButtonHidden(true)
            }
            .transition(.move(edge: .bottom))
        }
        .attachPartialSheetToRoot()
    }
}


#Preview {
    ContentView()
}

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