React Native
Use Blerivo from React Native.
Not published yet
react-native-blerivo is not on npm yet. Use it from the repository, in packages/react-native.
The React Native turbo module's TypeScript and C++ bindings come from
uniffi-bindgen-react-native over blerivo-ffi. The Rust
library ships prebuilt inside the package.
Regenerate the bindings
pnpm --filter react-native-blerivo run generateBuild the native libraries
iOS needs Xcode and the iOS Rust targets; Android needs the NDK. From packages/react-native:
pnpm exec ubrn build ios --config ubrn.config.yaml --release
pnpm exec ubrn build android --config ubrn.config.yaml --releaseThe API
WatchSession has one constructor per protocol plus handle(event) and saved_state(), named in TypeScript style.
See Sessions and Protocols.
Stub
A guide that wires the session to a React Native Bluetooth library is still to be written.