Closed vilsonei closed 1 year ago
Sorted out! The problem was in the sequence of calls, to solve it I did the following:
See the code:
BLEPrinter.getDeviceList().then(devices => {
BLEPrinter.connectPrinter(mySavedMacAddressPrinter).then(printer => {
// In IOs the timeout was necessary for the print to be successful.
setTimeout(() => {
BLEPrinter.printText(txt);
}, 1000);
},
(e) => {
console.log(e);
});
});
@vilsonei
I am working on an iOS app and for some reason, I can't retrieve BLEPrinter.getDeviceList()
Did you receive the list of devices at your end?
Ask your Question
I'm developing an app for iOS, I can list the bluetooth printers by the BLEPrinter.getDeviceList method but when I call the BLEPrinter.connectPrinter method I get the error "'connectPrinter: Can't connect to printer 815DC3CD-7B45-E3FC-9C82-BD0B348CDF40'"
Could anyone give me a tip on how to solve this problem on IOs?