Environment→ ・Device: iPad 9th generation ・OS:**iOS17.0.3 ・Printer model:EPSON PX-S730
What I want→ I would like to return an error when I submit a printing job, if the printer is not properly connected to the same WIFI as iPad(iOS17).
Current issues→ When I run the below code in iOS17, I was able to successfully submit a print job to printer and, printer returns completed(true) as the result. In iOS16 print job return as an error to the same below code.
Problem Description→ In iOS 16.6.1 when you know the correct printer access URL and submit a print job without connecting to the same WIFI as the printer, job return as an error.(return to the error code segment in the below code)
But after I updated the app to iOS 17.0.3 and run the same job, it's not returning as an error.(it returns to the completed block in the below code segment and completed Boolean value is true. ) When you check the "Print Summary" window in iPad, the status of the print job is Waiting.
So I would like to handle this process in the same way like iOS16 in iOS17. I would like to Print Job to return as a error when printer and iPad not connected to same WIFI(error like "cannot connect to the printer")
Test code:
let printInfo = UIPrintInfo(dictionary: nil)
printInfo.jobName = "Print Job"
printController.printInfo = printInfo
let pdfURL = Bundle.main.url(forResource: "sample", withExtension: "pdf")!
printController.printingItem = pdfURL
let printer = UIPrinter(url: printerUrl)
printController.print(to: printer, completionHandler: { [self] printController, completed, error in
if(error != nil){
print("error")
}else if completed{
print("completed")
}else{
print("cancel")
}
})
Does anyone knows if it's a bug in iOS17 or am I missing something?