rn-ota-bundler is a command-line interface (CLI) tool designed to streamline Over-The-Air (OTA) updates for React Native applications that utilize a multi-bundle architecture. It provides a comprehensive suite of commands to bundle, optionally obfuscate using `javascript-obfuscator`, zip, and manage React Native modules, then upload them to a remote server for distribution. The current stable version is 1.0.15. While a specific release cadence isn't published, the tool appears actively maintained as a solution for modern React Native development. Key differentiators include its end-to-end CLI workflow for managing the entire OTA lifecycle, from local bundling and obfuscation to server interaction for authentication, module/variant management, and release deployment, catering specifically to multi-bundle React Native setups. It simplifies version detection for both Android and iOS platforms by parsing `build.gradle` or `Info.plist`/`project.pbxproj` and integrates optional JavaScript obfuscation for deployed bundles.
npm install rn-ota-bundlerVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates the core workflow of `rn-ota-bundler`: authenticating, setting up modules and environments, locally bundling with optional obfuscation, releasing (bundling and uploading) to a server, listing bundles, and managing bundle properties post-release via CLI commands.
Ensure your project adheres to the expected structure. Module entry points should be `src/<module_name>/index.js`. Standard `android/` and `ios/` folders are required for automatic version detection.
Modify the `src/default-config.json` file in the package's source to point to your desired server URL before building/using for non-local environments. Consult package documentation for potential runtime configuration options.
To enable obfuscation, ensure `javascript-obfuscator` is installed as a dev dependency (`npm install -D javascript-obfuscator`) and a valid `obfuscator.config.json` file exists in your project's root directory, configured with your desired obfuscation settings.
Always run `npx rn-ota-bundler login` first to authenticate with the OTA server before attempting commands that require server interaction. Ensure your server is running and accessible.
Ensure you are running the command using `npx` (e.g., `npx rn-ota-bundler login`) or that the package is globally installed if you intend to use it without `npx` (`npm install -g rn-ota-bundler`).
Register the module first using the `modules --add` command: `npx rn-ota-bundler modules --add <module_name>`.
Run `npx rn-ota-bundler login` to authenticate and save your JWT token locally before attempting server-interacting commands like `release` or `bundles`.
Always provide the module name using the `-m` or `--module` option. For example: `npx rn-ota-bundler bundle -m homepage -p android`.