kenjdavidson / react-native-bluetooth-classic

⚛ Bluetooth classic Android(Bluetooth)/IOS(ExternalAccessory) module for serial communication
https://kenjdavidson.github.io/react-native-bluetooth-classic
MIT License
250 stars 93 forks source link

Remove condition when writing buffer data on IOS #325

Closed duc-tran-epam closed 5 months ago

duc-tran-epam commented 5 months ago

I suggest removing the condition when writing buffer data on iOS: if let sending = String(data: data, encoding: self.encoding).

When I tried to send buffer data, it couldn't go through the condition when the value was greater than 127. For example: Buffer.from([255]).

After removing the condition, the data could be processed and the printer worked exactly as it does on Android.