januslo / react-native-bluetooth-escpos-printer

React-Native plugin for the bluetooth ESC/POS & TSC printers.
MIT License
349 stars 409 forks source link

Keep Force Close in iOS #212

Open wongmalesan opened 1 year ago

wongmalesan commented 1 year ago

Hello can anyone help me how to use this lib in iOS?

It can work well in android, but when i try to use in iOS, when hit code "BluetoothManager.isBluetoothEnabled()" keep gettting force close, i have adding podscpec on the lib, and other suggest but still can solved it,

my project info react : 18.1.0 react-native : 0.70.6

can anyone help me? i can provide the code if necessary.

Thanks

OliveroRNDev commented 1 year ago

It has quite a bit of problems in iOS, I managed to use it but I did not try that function. What error does it give? I am having problems with the disconnect function which apparently is only implemented in android, and also found that every iOS device when scanning for devices has a different UUID so you have to save different values for different users. Do you by any chance have multiple printers? At the moment I have one only and need to see if connecting to a second one without disconnecting gives an error, which in android does...

OliveroRNDev commented 1 year ago

I actually tried using it and it works

wongmalesan commented 1 year ago

@OliveroRNDev i forgot to add this line on my project, without it, it make always force close i guess

NSBluetoothAlwaysUsageDescription Our app uses bluetooth to find, connect and transfer data between different devices

and now i facing another problem, that i can't print image on iOS, still find way to solve it. it only print blank black on iOS but success in android