HotupdaterHot Updater
React Native API

getDefaultChannel

The `HotUpdater.getDefaultChannel()` function returns the build-time default channel embedded in the app.

Usage

Use HotUpdater.getDefaultChannel() when you need the channel embedded in the native app, even if the app is currently using a runtime channel switch.

import { HotUpdater } from "@hot-updater/react-native";

const defaultChannel = HotUpdater.getDefaultChannel();
console.log(defaultChannel);

Behavior

  • Returns the build-time default channel configured in the native app
  • Does not change when HotUpdater.checkForUpdate({ channel }) applies a runtime channel switch
  • Defaults to production when no channel is configured

Example

const currentChannel = HotUpdater.getChannel();
const defaultChannel = HotUpdater.getDefaultChannel();
const switched = HotUpdater.isChannelSwitched();

console.log({ currentChannel, defaultChannel, switched });

If the app was built with production and later switched to beta at runtime:

  • HotUpdater.getChannel() returns "beta"
  • HotUpdater.getDefaultChannel() returns "production"
  • HotUpdater.isChannelSwitched() returns true