.popover(isPresented:
modifier doesn't work on Mac Catalyst when attached to the item in the toolbar. The app crashes on button click, when trying to present the popover.
- iOS 26 RC (macOS 26 RC)
- Feedback ID - FB20145491
import SwiftUI
struct ContentView: View {
@State private var isPresented: Bool = false
var body: some View {
NavigationStack {
Text("Hello, world!")
.toolbar {
ToolbarItem(placement: .automatic) {
Button(action: {
self.isPresented.toggle()
}) {
Text("Toggle popover")
}
.popover(isPresented: $isPresented) {
Text("Hello, world!")
}
}
}
}
}
}
#Preview {
ContentView()
}