Install
Requirements, package installation, native setup for iOS and Android, Expo notes, and the doctor CLI.
Requirements#
| React Native | 0.74+ (new architecture / bridgeless) · 0.68–0.73 (legacy bridge) |
| iOS | CocoaPods, Swift or Objective-C entry point |
| Android | Kotlin support in the host project |
| Node | 20+ for the CLI |
Install the package#
npm install @scalebun/react-nativeyarn add @scalebun/react-nativepnpm add @scalebun/react-nativeiOS#
cd ios && pod installAndroid#
No manual step is required for a standard project — the module is autolinked. If you use push notifications, the Android setup has additional requirements; see the push guide.
Optional peer dependencies#
The SDK degrades rather than failing when these are absent. Install only what you need:
| Package | Enables | Without it |
|---|---|---|
react-native-view-shot | Session replay frame capture | Replay captures no frames |
@notifee/react-native | Rich local notification display | Push still delivers; display is basic |
expo-router | Automatic screen detection on Expo Router | Set the navigation ref manually |
All three are declared optional in the package manifest, so a plain install will not pull them in and will not warn.
Verify the native setup#
The SDK ships a standalone CLI that inspects your project on disk — React Native version, new-architecture flag, Firebase config files, Android manifest entries — and prints the push adapter it will select plus exact fixes for anything missing:
npx scalebun doctorIt imports nothing from the SDK runtime, so it works before your first build and in CI.
Expo#
Managed Expo Go cannot load native modules, so the SDK's native lanes (replay frames, native crash capture, performance collectors) are unavailable there. Use a development build or a prebuild workflow.
Next#
Configuration — every
init()option.Quick start — end-to-end in five minutes.
Troubleshooting — if data is not arriving.