Posts

Post not yet marked as solved
0 Replies
444 Views
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 } }
Posted Last updated
.