Rollout & Cohorts
Gradually roll out bundles from 1% to 100%, inspect the active cohort on device, and target specific cohorts from the console.
Overview
Hot Updater uses cohorts to decide whether a device is eligible for a bundle.
- Every install gets a persisted numeric cohort from
1to1000. npx hot-updater deploy -r <percentage>maps1..100to those numeric cohorts.- Omitting
-ruses100, which is a full rollout. -r 0is also valid when you want to deploy a bundle without exposing it to numeric rollout yet.- Custom cohorts such as
qa,dogfood, orvip-testerscan be assigned directly on the device.
Percentage rollout applies only to numeric cohorts. Custom cohorts do not
participate in partial numeric rollout unless you add them to
Target Cohorts.
Gradually Roll Out a Bundle
Use -r during deploy:
npx hot-updater deploy -p ios -r 10
npx hot-updater deploy -p ios -r 25
npx hot-updater deploy -p ios -r 100-r 10targets 100 of 1000 numeric cohorts.-r 25targets 250 of 1000 numeric cohorts.-r 100, or omitting-r, targets the full audience.
Hot Updater keeps the selected numeric cohort set stable per bundle. That means
increasing a bundle from 10% to 25% expands the same bundle's eligible set
instead of reshuffling everyone.
See the Current Cohort on Device
Every device already has a cohort, even if you never call setCohort(). You
can read it at runtime with HotUpdater.getCohort():
import { HotUpdater } from "@hot-updater/react-native";
import { Text } from "react-native";
export function CohortStatus() {
return <Text>Current cohort: {HotUpdater.getCohort()}</Text>;
}Numeric values such as 17 or 900 participate in percentage rollout. Custom
values such as qa or dogfood are useful when you want explicit targeting.
Assign a Custom Cohort on a Device
Use HotUpdater.setCohort() when you want to place a device in a named group:
import { HotUpdater } from "@hot-updater/react-native";
function assignQaCohort() {
HotUpdater.setCohort("qa");
console.log("Active cohort:", HotUpdater.getCohort());
}- Valid values are numeric
1..1000or lowercase slugs such asqaandvip-testers. - Hot Updater normalizes the value before storing it.
- The assigned cohort is persisted on the device until you change it again or clear app data.
If you need to restore the original value later, call HotUpdater.getCohort()
first and store it before overriding.
Target Specific Cohorts from the Console
If you want to ship a bundle to a known set of devices, deploy the bundle first, then edit it in the console:
npx hot-updater deploy -p ios -r 0
npx hot-updater consoleIn the bundle editor:
- Open the deployed bundle.
- Set
Rollout Percentageif you want numeric rollout. - Add one or more values under
Target Cohorts (optional). - Click
Save Changes.
Target Cohorts accepts both numeric cohorts like 17 and custom cohorts like
qa.
Target Cohorts overrides percentage rollout. When at least one target cohort
is set, only matching cohorts receive the update, even if the rollout slider
is 0% or would normally exclude that device.
Example:
Device cohort: qa
Bundle rollout: 0.0%
Target Cohorts: qa
Result: only devices in the qa cohort receive the bundleRecommended QA Flow
- Read the current cohort on the tester device with
HotUpdater.getCohort(). - If needed, assign a known cohort such as
qawithHotUpdater.setCohort(). - Deploy the bundle with
hot-updater deploy -r <percentage>. - Open the console and add that value to
Target Cohorts. - Save the bundle and check for updates on the device.