Popovers are broken on Catalyst builds without portrait support

On macOS 15.2, any Mac Catalyst project that does not support portrait iPad orientation will no longer be able to successfully show the contents of any popover controls. This does not appear to be a problem on earlier versions of macOS and it only affects Mac Catalyst builds, not "Designed for iPad" builds.

STEPS TO REPRODUCE

  1. Create a project that utilizes Mac Catalyst.
  2. Create a simple button that shows a popover with simple content.
  3. Remove Portrait as a supported orientation.
  4. Run the project on macOS 15.2 as a Mac Catalyst build. Note that the content inside the popover is not shown the popover is shown.
  5. Run the project as Designed for iPad. Note that the popover content shows correctly.

@jhohmanst could open a bug report, include a sample project that demonstrates the issue. Please post the FB number here once you do.

Bug Reporting: How and Why? has tips on creating your bug report.

I have already opened a bug report and they instructed me to post here. I don't know what a FB number is but they did give me this:

Case-ID: 11338064

Do I need to do more?

This is still a problem on Mac Catalyst 18.6 (macOS Sequoia 15.6). The original "Steps to Reproduce" from the original post are still valid and reproduce the issue.

A simple code that shows the issue:

class RootViewController {
    func presentPopup(action: UIAction) {
        if traitCollection.userInterfaceIdiom == .mac {
                let viewController = UIViewController()
                viewController.view.backgroundColor = .systemYellow
                viewController.preferredContentSize = CGSize(width: 300, height: 200)
                viewController.modalPresentationStyle = .popover
                viewController.popoverPresentationController?.sourceItem = action.sender as? UIPopoverPresentationControllerSourceItem
                viewController.popoverPresentationController?.delegate = self
                viewController.popoverPresentationController?.permittedArrowDirections = .up
                present(viewController, animated: true)
            }
      }
}
extension RootViewController: UIPopoverPresentationControllerDelegate {
    func adaptivePresentationStyle(for controller: UIPresentationController, traitCollection: UITraitCollection) -> UIModalPresentationStyle {
        return .none
    }
}

Once you add Portrait as a supported orientation under the iPad Orientation, it works.


Another, unrelated issue, is that you get three warnings when the controller is presented:

UIScene property of UINSSceneViewController was accessed before it was set.
UIScene property of UINSSceneViewController was accessed before it was set.
UIScene property of UINSSceneViewController was accessed before it was set.

However the warnings don't affect the popup functionality.

Popovers are broken on Catalyst builds without portrait support
 
 
Q