Hi everyone,
I’ve encountered an issue where using a popover
inside the toolbar
of a Catalyst app causes a crash on macOS 26 beta 5 with Xcode 26 beta 5. Here’s a simplified code snippet:
import SwiftUI
struct ContentView: View {
@State private var isPresentingPopover = false
var body: some View {
NavigationStack {
VStack {
}
.padding()
.toolbar {
ToolbarItem {
Button(action: { isPresentingPopover.toggle() }) {
Image(systemName: "bubble")
}
.popover(isPresented: $isPresentingPopover) {
Text("Hello")
.font(.largeTitle)
.padding()
}
}
}
}
}
}
Steps to reproduce:
- Create a new iOS app using Xcode 26 beta 5.
- Enable Mac Catalyst (Match iPad).
- Add the above code to show a Popover from a toolbar button.
- Run the app on macOS 26, then click the toolbar button.
The app crashes immediately upon clicking the toolbar button.
Has anyone else run into this? Any workarounds or suggestions would be appreciated!
Thanks!