StarPRNT-SDK-iOS-Swift
StarPRNT-SDK-iOS-Swift copied to clipboard
Cash Drawer on Mpop
Description
The cash drawer opens on the different model except the mPop . What am I missing for this specific model ? I have searched the entire sdk doc but found no specific instruction for it.
Your device where the bug occurs
- Device: iPads
- OS: iOS 15.0*
- Version 'StarIO', '2.9.0' 'StarIO_Extension', '1.16.0'
Your printer
-
Model Names: mPop
-
Interface: bluetooth
Your development environment
xcode
Additional context
here is the snippet of code func sendDataForCashDrawer (fullReconnect:Bool = false) -> Bool { `if !initializePrinterObject() { return false }
if !self.cashDrawerOpenActiveHigh {
return false
}
builder!.appendPeripheral(**SCBPeripheralChannel.no1**)
builder!.endDocument()
let commands = builder!.commands.copy() as! Data
GlobalQueueManager.shared.serialQueue.async {
_ = Communication.sendCommandsDoNotCheckCondition(commands,
portName: self.portName,
portSettings: self.portSettings,
timeout: 10000,
completionHandler: { (result: Bool, title: String, message: String) in
let formatter = DateFormatter()
formatter.dateFormat = "yyyy-MM-dd HH:mm:ss.SSS "
DispatchQueue.main.async {
if result {
//PrintMessageView.show(message: "Tiroir caisse ouvert !!!", theme: .success)
}else if !fullReconnect{
PrintMessageView.cashDrawerFailedToOpen(message: "\(title) : \(message)" , theme: .warning)
} else {
PrimaryPrinterService.shared.devicesDelegate = self
PrimaryPrinterService.shared.startConnectionRoutine()
return
}
self.initializePrinterObject()
}
})
}
return true
}`