Installation (npm Package)
This guide covers installing the Bubbl React Native bridge package and wiring the required native scaffold.
1) Install the package
npm install @bubbl-tech/react-native-sdk
Install required peer dependencies for maps/location/web content rendering:
npm install react-native-get-location react-native-maps react-native-safe-area-context react-native-webview
2) Import from package
Use the SDK directly from npm instead of creating local nativemodules/* bridge files:
import { BubblBridge } from '@bubbl-tech/react-native-sdk';
3) Wire Android native scaffold
Copy the templates shipped with the package into your app:
node_modules/@bubbl-tech/react-native-sdk/templates/android/BubblModule.ktnode_modules/@bubbl-tech/react-native-sdk/templates/android/BubblPackage.ktnode_modules/@bubbl-tech/react-native-sdk/templates/android/BubblInitManager.ktnode_modules/@bubbl-tech/react-native-sdk/templates/android/TenantConfigStore.kt
Target location:
android/app/src/main/java/<your package>/bubbl/
Then:
- Replace
{{ANDROID_PACKAGE}}in copied files. - Apply setup from:
templates/android/MainApplication.snippet.kttemplates/android/AndroidManifest.snippet.xml
- Ensure Gradle dependencies include Bubbl SDK + Firebase Messaging + Play Services Location/Maps.
For full platform walkthrough, follow Android Setup.
4) Wire iOS native scaffold
Add these files from the package to your iOS app target:
node_modules/@bubbl-tech/react-native-sdk/templates/ios/BubblModule.swiftnode_modules/@bubbl-tech/react-native-sdk/templates/ios/BubblModule.m
Then apply setup from:
templates/ios/Podfile.snippet.rbtemplates/ios/AppDelegate.snippet.swift
Also ensure required Info.plist location/notification keys are present.
For full platform walkthrough, follow iOS Setup.
5) Verify bridge is connected
import { BubblBridge } from '@bubbl-tech/react-native-sdk';
const hello = await BubblBridge.sayHello();
console.log('bubbl_bridge', hello);
If the native module is not wired yet, the package throws an explicit setup error on startup.