Added in Version 1.0.0

StarPrinter

The class that controls the printer

Constructor

init(_ connectionSettings: StarConnectionSettings)

Initialize object

Property

information

Printer information

StarPrinterInformation

connectionSettings

Printer connection settings

StarConnectionSettings

template

Template

String

printerDelegate

Status event for the printer

PrinterDelegate

drawerDelegate

Status event for the cash drawer

DrawerDelegate

inputDeviceDelegate

Status event for an input device

InputDeviceDelegate

displayDelegate

Status event for the customer display

DisplayDelegate

openTimeout

Open timeout (msec)

Int

printTimeout

Print timeout (msec)

Int

getStatusTimeout

Get status timeout (msec)

Int

starConfigurationTimeout

Set/Get Star Configuration timeout(msec)

Int

Method (for iOS 13 or later)

open() async

Open the printer

print(command: String) async

Print

print(command: String, starSpoolJobSettings: StarSpoolJobSettings) async

Print using the printer’s spooler function

print(raw: Data) async

Print binary data

getStatus() async

Get the printer status

getSpoolJobStatus(jobId: Int) async

Get the print job status of the specified print job ID

getSpoolJobStatusListAsync(size: Int) async

Get the print job history (List of print job status) for the specified number of jobs from the most recent.

getStarConfiguration(password: String? = nil) async

Get the present Star Configuration

getDefaultStarConfiguration() async

Get the default Star Configuration

setStarConfiguration(starConfiguration: String) async

Set Star Configuration

close() async

Close the printer

Warning

Method (for iOS 12) is provided only for compatibility of applications supporting iOS 12 and will be removed in the future when the minimum supported OS version of this SDK is raised to iOS 15.

[Deprecated] Method (for iOS 12)

open(completion: @escaping (Error?) -> Void)

Open the printer

print(command: String, completion: @escaping (Error?) -> Void)

Print

print(command: String, starSpoolJobSettings: StarSpoolJobSettings, completion: @escaping (Int?, Error?) -> Void)

Print using the printer’s spooler function

print(raw: Data, completion: @escaping (Error?) -> Void)

Print binary data

getStatus(completion: @escaping (StarIO10.StarPrinterStatus?, Error?) -> Void)

Get the printer status

getSpoolJobStatus(jobId: Int, completion: @escaping (StarSpoolJobStatus?, Error?) -> Void)

Get the print job status of the specified print job ID

getSpoolJobStatusList(size: Int, completion: @escaping ([StarSpoolJobStatus]?, Error?) -> Void)

Get the print job history (List of print job status) for the specified number of jobs from the most recent.

getStarConfiguration(completion: @escaping (String?, Error?) -> Void)

Get the present Star Configuration

getDefaultStarConfiguration(completion: @escaping (String?, Error?) -> Void)

Get the default Star Configuration

setStarConfiguration(starConfiguration: String, completion: @escaping (Error?) -> Void)

Set Star Configuration

close(completion: @escaping () -> Void)

Close the printer