StarXpand SDK for iOS/Android Developer's Manual Ver. 1.8.0

Last update: November 1, 2024

Migration Procedure from V1.0.0

Changes in Versions That Support StarPrinter Classes

Starting with the StarXpand SDK V2.0.0, the OS versions that support the StarPrinter class methods have changed.

1. The following async-specified methods are now available for use on iOS 13 or later.

Method

V1.0.0

V2.0.0

open() async

iOS 15 or later

iOS 13 or later

print(command:) async

iOS 15 or later

iOS 13 or later

print(raw:) async

iOS 15 or later

iOS 13 or later

getStatus() async

iOS 15 or later

iOS 13 or later

close() async

iOS 15 or later

iOS 13 or later

2. Methods to store completion in arguments are supported only on iOS 12.

  • To use them on iOS 13 or iOS 14, migrate them according to the migration method.
  • If they are used on iOS 13 or later, they can be built, but will result to an execution error.

Method

V1.0.0

V2.0.0

open(completion:)

iOS 12 - 14

iOS 12

print(command:completion:)

iOS 12 - 14

iOS 12

print(raw:completion:)

iOS 12 - 14

iOS 12

getStatus(completion:)

iOS 12 - 14

iOS 12

close(completion:)

iOS 12 - 14

iOS 12

Migration Method

Change the #available() parameter from iOS 15.0 to iOS 13.0 as shown below.

//if #available(iOS 15.0, *) {   // <-- v1.0.0
if #available(iOS 13.0, *) {     // <-- v2.0.0 or later
    Task {
        do {
            try await printer.open()

            // ...
        }
    }
} else {
    printer.open(completion: { error in
        // ...
    })
}