B Bubbl Docs

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.kt
  • node_modules/@bubbl-tech/react-native-sdk/templates/android/BubblPackage.kt
  • node_modules/@bubbl-tech/react-native-sdk/templates/android/BubblInitManager.kt
  • node_modules/@bubbl-tech/react-native-sdk/templates/android/TenantConfigStore.kt

Target location:

  • android/app/src/main/java/<your package>/bubbl/

Then:

  1. Replace {{ANDROID_PACKAGE}} in copied files.
  2. Apply setup from:
    • templates/android/MainApplication.snippet.kt
    • templates/android/AndroidManifest.snippet.xml
  3. 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.swift
  • node_modules/@bubbl-tech/react-native-sdk/templates/ios/BubblModule.m

Then apply setup from:

  • templates/ios/Podfile.snippet.rb
  • templates/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.