A printer on the network.


class UIPrinter : NSObject


You use a printer object to obtain information about a printer so that you can display that information in your app’s interface. You do not use printer objects to communicate with the printer directly.

Most of the time, you use a UIPrinterPickerController object to retrieve a printer object representing the printer selected by the user. If you already have a URL containing the address of a printer—perhaps one that was previously selected by the user—you can use that URL to create a printer object directly. When creating your own printer objects, you must connect to the printer using the contactPrinter(_:) method before retrieving any of the printer’s attributes.


Creating a Printer Object

init(url: URL)

Creates and returns a printer with the specified location.

Getting the Printer’s Address

var url: URL

The full address of the printer.

Getting the Printer Information

var displayName: String

The human-readable printer name.

var displayLocation: String?

The human-readable text describing the location of the printer.

var makeAndModel: String?

A string containing the manufacturer’s name and the model name of the printer.

var supportedJobTypes: UIPrinter.JobTypes

The capabilities of the printer.

struct UIPrinter.JobTypes

Bit mask flags indicating the types of jobs that the printer supports.

var supportsColor: Bool

A Boolean value indicating whether the printer supports color printing.

var supportsDuplex: Bool

A Boolean value indicating whether the printer supports printing on both sides of a piece of paper.

Connecting to the Printer

func contactPrinter(((Bool) -> Void)?)

Connects to the printer and gathers information about its capabilities.


enum UIPrinter.CutterBehavior

Constants for specifying the cutter behavior of a roll-fed printer.


Inherits From

Conforms To

See Also

Job Info

class UIPrintInfo

Information about a print job.

class UIPrintPaper

The size of paper used for a print job and the rectangle in which content can be printed.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software