Documentation

Ship OTA updates to your React Native app. Guides for installation, concepts, CLI, and SDK integration.

SDK Integration

Bundle Drop gives you two main SDK integration styles:

Runtime APIs

  • checkForUpdate(...): checks whether an update, rollback, or no-op decision is available
  • downloadUpdate(...): downloads and stages an update
  • applyUpdate(...): applies a staged update and reloads the app
  • getUpdateState(): returns whether a bundle exists locally and whether one is pending apply
  • getAvailableChannels(): fetches public channel names
  • BundleDrop.setChannel(...): switches the active runtime channel
  • setUserProperty(...) and removeUserProperty(...): manage user properties for targeted rollout

The detailed function behavior and return shapes are covered on Runtime APIs.

Choosing Between Them

Start with BundleDrop.init in every app.

Use useBundleDrop if you want to build your own update UI and let users trigger actions manually.

If you want startup automation, choose a non-manual policy in BundleDrop.init. The policy behavior is covered in Update Policies.

Typical Usage

index.js
1import { BundleDrop, useBundleDrop } from "@gfean/react-native-bundle-drop"; 2 3BundleDrop.init({ 4 enabled: !__DEV__, 5 environment: __DEV__ ? "development" : "production", 6 channelName: "General", 7 policy: __DEV__ ? "manual" : "on-next-launch", 8}); 9 10// Manual UI (hook) 11const { 12 status, 13 channelName, 14 setChannel, 15 isBusy, 16 installedInfo, 17 pendingApply, 18 checkLatest, 19 downloadUpdate, 20 applyUpdate, 21} = useBundleDrop(); 22 23// downloadUpdate() stages the bundle. 24// It applies on next launch or when you call applyUpdate().

Related Docs