React Native integration
The Withings SDK can be integrated into React Native applications using native bridging technology. This allows you to provide Withings device setup functionality in your React Native app while leveraging the native iOS and Android SDKs under the hood.
Overview
The React Native integration uses native modules to bridge JavaScript and native code:
- iOS: Uses
RCTBridgeModuleto bridge Swift/Objective-C and JavaScript - Android: Uses
ReactContextBaseJavaModuleto bridge Kotlin/Java and JavaScript
This approach ensures you can access all native SDK features while maintaining a React Native development workflow.
Sample code
Get the complete React Native SDK sample app here: https://github.com/withings-sdk/withings-sdk-sample-react-native
The sample app demonstrates:
- Complete iOS and Android native module implementations
- WebView integration for device setup
- Background sync event handling
- Proper bridging patterns for both platforms