iOS 13 上未显示 UIPrinterPickerController

UIPrinterPickerController not showing on iOS 13

我一直在尝试让 UIPrinterPicker 出现,但由于某种原因它从来没有出现过。立即调用完成处理程序。 UIPrintInteractionController 显示得很好,但由于某种原因拒绝显示。这是我目前使用的代码

    let picker = UIPrinterPickerController(initiallySelectedPrinter: nil)
    picker.present(animated: true) { (controller, complete, error) in
        print("done")
    }

Implement UIPrinterPickerControllerDelegate so it works for iOS 13 https://developer.apple.com/documentation/uikit/uiprinterpickercontroller/1620514-present

class ViewController: UIViewController {

    @IBAction func btnTapped(_ sender: Any) {
        let picker = UIPrinterPickerController(initiallySelectedPrinter: nil)
        picker.delegate = self
        picker.present(animated: true) { (controller, complete, error) in
            print("done")
        }
    }
}

// MARK:- UIPrinterPickerControllerDelegate
extension ViewController: UIPrinterPickerControllerDelegate {
    func printerPickerControllerParentViewController(_ printerPickerController: UIPrinterPickerController) -> UIViewController? {
        return self
    }
}