React Native API
resetChannel
The `HotUpdater.resetChannel()` function clears the runtime channel switch and restores the original bundle.
Usage
Use HotUpdater.resetChannel() to discard downloaded OTA state and restore the
bundle selection embedded in the native app. The reset runs even when no
runtime channel override is active.
import { HotUpdater } from "@hot-updater/react-native";
async function handleResetChannel() {
const didReset = await HotUpdater.resetChannel();
if (didReset) {
await HotUpdater.reload();
}
}Behavior
- Clears any runtime channel override and makes the build-time default channel active again.
- Clears downloaded OTA bundle metadata, launch state, and downloaded bundle directories. Crash history is preserved.
- Restores built-in bundle selection. Call
HotUpdater.reload()to load that bundle in the current app session. - Runs the native reset regardless of the value returned by
HotUpdater.isChannelSwitched(). - Resolves to
truewhen the reset succeeds. A native reset failure can resolve tofalseor reject with an error.
Example
const didReset = await HotUpdater.resetChannel();
if (didReset) {
await HotUpdater.reload();
}When to Use
- Leave a beta or staging runtime channel switch
- Add a "Return to default channel" action in a debug or settings screen
- Recover to the original shipped bundle after testing another channel