Summary:
When running our iPad app on macOS (“Designed for iPad”), invoking
UIPrintInteractionController intermittently fails to show a working print sheet. The same code works reliably on iPad or iOS devices and also on macOS pre 26.
This regression started after updating to macOS Tahoe Version 26.0 (25A354)
Steps to Reproduce:
Launch the attached minimal sample on macOS (Designed for iPad).
Tap “Print plain text”
Expected Results:
The print panel should appear and discover AirPrint printers reliably, as on iPad/iOS or previous mac versions.
Actual Results:
On macOS, the panel fails to appear.
Mac version:
macOS Tahoe 26.0 (25A354)
xCode version:
26.0 (17A324)
Sample Reproduction Code:
struct ContentView: View {
var body: some View {
Button("Print plain text") {
printPlainText()
}
.buttonStyle(.borderedProminent)
.padding()
}
func printPlainText() {
let text = "This is just a sample print"
guard UIPrintInteractionController.isPrintingAvailable else {
NSLog("Printing not available on this device")
return
}
let info = UIPrintInfo(dictionary: nil)
info.outputType = .general
info.jobName = "Plain Text"
let formatter = UISimpleTextPrintFormatter(text: text)
formatter.perPageContentInsets = UIEdgeInsets(top: 36, left: 36, bottom: 36, right: 36)
let ctrl = UIPrintInteractionController.shared
ctrl.printInfo = info
ctrl.printFormatter = formatter
DispatchQueue.main.async {
ctrl.present(animated: true) { _, completed, error in
if let error { NSLog("Print error: \(error.localizedDescription)") }
else { NSLog(completed ? "Print completed" : "Print cancelled") }
}
}
}
}
Also I have added the following values to info.plist:
<key>NSLocalNetworkUsageDescription</key>
<string>This app needs local network access to discover AirPrint printers.</string>
<key>NSBonjourServices</key>
<array>
<string>_ipp._tcp.</string>
<string>_ipps._tcp.</string>
<string>_printer._tcp.</string>
</array>
AirPrint
RSS for tagAirPrint allows photo and document printing in your iOS apps and macOS apps without the need to download or install drivers.
Posts under AirPrint tag
5 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Description:
1. When initiating the print flow via UIPrintInteractionController, and no printer is initially connected, iOS displays all possible paper sizes in the paper selection UI. However, if a printer connects in the background after this view is shown, the list of paper sizes does not automatically refresh to reflect only the options supported by the connected printer.
2. If the user selects an incompatible paper size (one not supported by the printer that has just connected), the app crashes due to an invalid configuration.
Steps to Reproduce:
Launch the app and navigate to the print functionality.
Tap the Print button to invoke UIPrintInteractionController.
At this point, no printer is yet connected. iOS displays all available paper sizes.
While the paper selection UI is visible, the AirPrint-compatible printer connects in the background.
Without dismissing the controller, the user selects a paper size (e.g., one that is not supported by the printer).
The app crashes.
Expected Result: App should not crash
Once the printer becomes available (connected in the background), the paper size options should refresh automatically.
The list should be filtered to only include sizes that are compatible with the connected printer.
This prevents the user from selecting an invalid option, avoiding crashes.
Actual Result: App crashes
The paper size list remains unfiltered.
The user can still select unsupported paper sizes.
Selecting an incompatible option causes the app to crash, due to a mismatch between UI selection and printer capability.
Demo App Crash : https://drive.google.com/file/d/19PV02wzOJhc2DYI6kAe-uxHuR1Qg15Bu/view?usp=sharing
Apple Files App Crash: https://drive.google.com/file/d/1flHKuU_xaxHSzRun1dYlh8w7nBPJZeRb/view?usp=sharing
Ref- https://support.apple.com/en-in/guide/deployment/dep3b4cf515/web
When we deploy an Payload with identifier "com.apple.airprint" , It will add the deployed printer configurations to printers list in mac. Which additionally needs the mac user to add it from Settings -> Printers -> Add Printer -> (Deployed Printer Configuration will be listed here) Select the printer -> Click Add .
Screenshot where user need to add it manually after profile association is attached below.
Now the Printer is available to be used ,when an share option in any document is clicked.
Why this flow requires multiple to and fro. Can it be able to deploy the printer straight to Printers available List instead of manually adding from the above screenshot
Environment
iPad:10th
iOS:18.1
Printer:EPSON PX-S730
Problem
In iOS18.1, When printing with AirPrint, PrintCenter is no longer displayed on AppSwitcher.
In iOS17, PrintCenter was displayed on AppSwitcher.
Question
Is this a specification change?
I would like to know if there is a way to check PrintCenter on AppSwitcher in the same way as iOS17.
Ref
No information after iOS18.1 update.
https://support.apple.com/ja-jp/109349
There is no mention of AirPrint updates in the AppleDeveloper release notes.
https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-18-release-notes
https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-18_1-release-notes
After updating to Mac OS Sonoma, we have encountered compatibility issues with our iPad-designed application, specifically with the AirPrint functionality, when it is run on MacOS. The AirPrint feature stopped working properly through UIPrintInteractionController.shared.
We have noticed that when we compile the application using Catalyst, the AirPrint functionality is restored and works as expected. However, this solution is not viable for us due to the restrictions associated with the frameworks we are utilizing.
We are seeking alternative solutions, and any help or guidance would be highly appreciated to resolve this issue and ensure a seamless and uninterrupted user experience in our application.
STEPS TO REPRODUCE
Create an app for ipad with just a button and this code
var str = "TEST"
let printInfo = UIPrintInfo(dictionary:nil)
printInfo.outputType = .general
printInfo.jobName = "Report"
printInfo.orientation = .portrait
let printController = UIPrintInteractionController.shared
printController.printInfo = printInfo
printController.showsNumberOfCopies = false
printController.showsPageRange = false
printController.showsNumberOfCopies = false
let formatter = UIMarkupTextPrintFormatter(markupText: str)
formatter.contentInsets = UIEdgeInsets(top: 72, left: 72, bottom: 72, right: 72)
printController.printFormatter = formatter
printController.present(animated: true, completionHandler: nil)
2.Run it on a MacOS with Sonoma, there is no error on console or anything but it don't work.
-If you run it with Catalyst it just works when adding the Printing permission of App Sandbox in Signing & Capabilities.