Faced some issues tinkering with React Native's BLE library and trying to get it to work. Was following this repo and was faced with Render Error: Cannot read property 'createClient' of null while trying to load the app on Expo Go.
The app seems to be crashing on the line: new BleManager(), but loading the app on emulator works fine and crashes on Expo Go. Weird!
Development Server
- After playing around I finally got
BleManager()to stop crashing after setting up the project to use a development build by running
expo prebuild
- Create a development build like so:
npx eas build --profile development
- Scan the QR, install the app on your phone and open it. Then you will need to run the dev server for your development build:
yarn start --dev-client
The server should appear on the development build on your phone and then you can run your mobile app.
