Popover in Toolbar Causes Crash in Catalyst App on macOS 26

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:

  1. Create a new iOS app using Xcode 26 beta 5.
  2. Enable Mac Catalyst (Match iPad).
  3. Add the above code to show a Popover from a toolbar button.
  4. 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!

FB19460396

Same problem with UIKit on Catalyst showing a popover from a UIBarButtonItem with iOS 26 released version.

@Gong did you find a workaround?

@HOsy No :( no luck with the popover. I workaround the crash by implementing a custom floating panel using UIViewControllerRepresentable.

I'm experiencing the exact same crash in UIKit. With UIBarButtonItems and Popovers. On Mac Catalyst app build with Xcode 26.2 (17C52) on Tahoe 26.2.

Same will happen with UIView as a source when presenting the a UIViewController if a zoom transition is set vc.preferredTransition = .zoom { _ in sendingView }

Setting the info.plist UIDesignRequiresCompatibility to YES, prevents the default zoom transition and shows the popup with arrows.

Here is my work around for UIKit

extension UIViewController {
    
    @objc func configureAsPopoverWith(sender: Any?) {
        self.modalPresentationStyle = .popover
        var enableZoom: Bool = true
        var source: Any? = sender
#if targetEnvironment(macCatalyst)
        // PopOver with Zoom crashes for macOS 26
        if #available(iOS 26.0, *), let view = (sender as? UIBarButtonItem)?.value(forKey: "view") as? UIView {
            source = view
        }
        enableZoom = false
#endif
        
        if let sourceView = source as? UIView {
            self.popoverPresentationController?.sourceView = sourceView
            self.popoverPresentationController?.sourceRect = sourceView.bounds
            if #available(iOS 18.0, *), enableZoom {
                self.preferredTransition = .zoom { _ in sourceView }
            }
        } else if let sourceItem = source as? UIBarButtonItem {
            self.popoverPresentationController?.barButtonItem = sourceItem
        }
    }
    
}
Popover in Toolbar Causes Crash in Catalyst App on macOS 26
 
 
Q