rusel1989 / react-native-bluetooth-serial

Port of https://github.com/don/BluetoothSerial for react native
476 stars 291 forks source link

No devices found #3

Closed vincenzoiacovone closed 8 years ago

vincenzoiacovone commented 8 years ago

Always no devices found on iOS

Promise.all([ Bluetooth.isEnabled(), Bluetooth.isConnected(), Bluetooth.list() ]) .then((values) => { console.log(values) })

Output: true, false, []

React Native 0.31, iOS 9.3

rusel1989 commented 8 years ago

On ios you have to add your service UUIDs here ... https://github.com/rusel1989/react-native-bluetooth-serial/blob/master/ios/RCTBluetoothSerial/BLEDefines.h ... and then handle it here https://github.com/rusel1989/react-native-bluetooth-serial/blob/master/ios/RCTBluetoothSerial/BLE.m#L535 ... just send PR with necessary changes i will accept it ... also if you just need to list devices and no read/write maybe look for another lib