Default Channel Setup
Set the default release channel embedded in your native app and deploy updates to that channel.
Overview
The default channel is the release channel embedded in your native app at build time.
- Apps use
productionwhen no channel is specified. - This channel decides where the app checks for updates by default.
- Changing the default channel requires rebuilding the native app.
Channel names are exact and case-sensitive: production and Production are
different channels. The server stores each channel as a persistent row with an
opaque ID; use its name in app configuration and deployment commands. Setting
the native default does not create or delete server channel rows. Custom-server
integrations manage those rows through the
admin handler.
To temporarily move a device to another channel without rebuilding, see Runtime Channel Switch.
Set the Default Channel
1. Specify the Channel in Native Configuration
Use the hot-updater channel set command to specify your desired channel.
npx hot-updater channel set <channel>The command updates these native project settings:
<key>HOT_UPDATER_CHANNEL</key>
<string>your_set_channel</string> Custom Configuration Paths
For projects with non-standard structures or iOS app extensions, you can
configure custom paths for platform-specific configuration files in your
hot-updater.config.ts:
import { defineConfig } from "hot-updater";
export default defineConfig({
// ... other configurations
platform: {
ios: {
infoPlistPaths: [
"ios/YourApp/Info.plist",
"ios/YourAppExtension/Info.plist", // Include extension Info.plist
"ios/NotificationService/Info.plist",
],
},
android: {
androidManifestPaths: [
"android/app/src/main/AndroidManifest.xml",
"android/app/src/debug/AndroidManifest.xml", // Include additional manifests
],
},
},
});This is useful when:
- Your iOS project has app extensions such as widgets or notification services
- You have multiple Android build variants with different manifest paths
- Your project does not follow the standard React Native file structure
Configure these custom paths before running
hot-updater channel set so all relevant files are updated with the new
channel.
2. Rebuild the App with the New Channel
After setting the channel, rebuild your app in Release mode:
iOS:
cd ios && pod install && cd ..
npx react-native run-ios --mode ReleaseAndroid:
npx react-native run-android --mode Release3. Deploy Updates to That Channel
You can specify the target channel directly during deployment:
npx hot-updater deploy -p <"ios" | "android"> -c "<channel>"Replace <channel> with your target channel name, for example dev, staging,
or production.
Check the Current Channel
Use hotUpdater.getChannel() in your UI to confirm that the app is using the
intended channel.
Example Usage
Keep the baseURL and client key from App setup.
Managed providers require this client key; provider and admin credentials stay
out of the app.
import { HotUpdater } from "@hot-updater/react-native";
export const hotUpdater = HotUpdater.init({
baseURL: "<your-update-server-url>",
requestHeaders: {
"x-api-key": "<your-client-api-key>",
},
});import { Text, View } from "react-native";
import { hotUpdater } from "./src/hotUpdater";
export default function App() {
const channel = hotUpdater.getChannel();
return (
<View>
<Text>Current Channel: {channel}</Text>
</View>
);
}init configures the client without checking for updates. Call
hotUpdater.checkForUpdate({ updateStrategy: "appVersion" }) when your app is
ready, then download and apply through the
custom update flow.
Key Rules
- The default channel is embedded in the native app at build time.
- Changing that default channel requires a rebuild.
hot-updater deploy -c <channel>should match the channel you want the app to receive updates from.hotUpdater.getChannel()returns the effective channel, which may differ at runtime if a runtime channel switch is active.- If you need temporary runtime switching, use Runtime Channel Switch.