react-native-bluetooth-escpos-printer icon indicating copy to clipboard operation
react-native-bluetooth-escpos-printer copied to clipboard

Keep Force Close in iOS

Open wongmalesan opened this issue 2 years ago • 3 comments

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

wongmalesan avatar Dec 22 '22 08:12 wongmalesan

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 avatar Dec 24 '22 16:12 OliveroRNDev

I actually tried using it and it works

OliveroRNDev avatar Dec 24 '22 16:12 OliveroRNDev

@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

wongmalesan avatar Jan 02 '23 02:01 wongmalesan

Can you please give an explanation on how you add the NSBluetoothAlwaysUsageDescription on your project? I'm facing the same issue, every time I tried to connect with the printer on iOS the app crashes.

Jare9716 avatar Oct 03 '24 19:10 Jare9716