star-micronics / StarXpand-SDK-iOS

StarXpand SDK for iOS is a software development kit for supporting application development for Star Micronics devices.
https://star-m.jp/starxpandsdk-oml.html
Other
27 stars 5 forks source link

Sending printing commands while monitoring a Printer #18

Closed cumanzor closed 1 year ago

cumanzor commented 1 year ago

Is it possible to send a print command to a printer that is being monitored? With the old version of the SDKs (StarIO and StarIOExtension it was possible to monitor a Port (set the printer delegate, etc) and also send print commands to the same port at the same time. This doesn't seem to be possible anymore in the StarXpand. Wondering if this is expected behavior, or if there is a different way of receiving delegate information (such as cash drawer events) and print at the same time.

Your device where the bug occurs

Device: iPhones and iPad

OS: iOS

Version: 13 - 16

Your printer: TSP100IIIBI & TSP100IIILAN

Firmware Version: Unknown

Interface: BT, LAN

Your development environment
ProductName:        macOS
ProductVersion:     13.4.1
ProductVersionExtra:    (c)
BuildVersion:       22F770820d
gare-bear commented 1 year ago

Hi @cumanzor, I edited your comment to the original one you posted last week. If you solved your issue, you can simply mark it as completed. No need to delete the original description as it might help others with similar questions.

Even better if you could share your solution (maybe this was covered in our documentation).

cumanzor commented 1 year ago

Hey @gare-bear. Yeah I closed this as this was a non issue. You can monitor a printer and still send commands as long as the port is still opened. That is, as long as you don't call close() in the StarPrinter device. The monitoring code sample was closing the port, and I assumed this was required. Just an oversight.

gare-bear commented 1 year ago

got it! thanks for sharing your feedback!