Post

Replies

Boosts

Views

Activity

From the running applications, How can i get the details/PrinterName of the selected printer from the printcenter in the latest MacOS14 Sonoma?
Previously in MacOS13 and below versions, we used get the printer name from the running applications by this below code:- let apps = NSWorkspace.shared.runningApplications for app in apps{ if(app.bundleIdentifier == "com.apple.print.PrinterProxy"){ let spoolerName = app.bundleURL?.deletingPathExtension().lastPathComponent print("spooler name is : \(spoolerName ?? "")") //spooler name is : HP LaserJet Pro M428f-M429f } } In MacOS 14, the same approach is not able get the printer name as the implementation is modified to PrintCenter. So, can someone please suggest me the way to the fetch selected printer details from the printCenter. let apps = NSWorkspace.shared.runningApplications for app in apps{ if(app.bundleIdentifier == "com.apple.printcenter"){ let spoolerName = app.bundleURL?.deletingPathExtension().lastPathComponent print("spooler name is : \(spoolerName ?? "")") //spooler name is : Print Centre } }
0
0
486
Oct ’23