januslo / react-native-bluetooth-escpos-printer

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

alert error on pair bluetooth device on Ios #107

Open ahsanparacha02 opened 4 years ago

ahsanparacha02 commented 4 years ago

hi, i have just setup bluetooth escpos-printer on my project every thing worked fine on android but not working on ios, app crash (alert) when initialize bluetooth pair device. Here is code for ios

let bluetoothManagerEmitter = new NativeEventEmitter(BluetoothManager); his._listeners.push(bluetoothManagerEmitter.addListener(BluetoothManager.EVENT_DEVICE_ALREADY_PAIRED, (rsp) => { this._deviceAlreadPaired(rsp) })); this._listeners.push(bluetoothManagerEmitter.addListener(BluetoothManager.EVENT_DEVICE_FOUND, (rsp) => { this._deviceFoundEvent(rsp) })); this._listeners.push(bluetoothManagerEmitter.addListener(BluetoothManager.EVENT_CONNECTION_LOST, () => { this.setState({ name: '', boundAddress: '' }); }));

Simulator Screen Shot - iPhone 5s - 2020-04-17 at 14 10 38