CodePush

CodePush is a cloud-based service that allows developers to deliver over-the-air (OTA) updates for mobile apps—without waiting for app store reviews or resubmissions. It enables you to push real-time updates such as:

  • JavaScript files

  • Images

  • Other app assets

With CodePush integrated into your project via App Maker, you can instantly ship bug fixes, improvements, or UI tweaks to users across iOS, Android, and Huawei platforms.

CodePush updates are tightly linked to your app’s builds. Each CodePush version is associated with a successful build and a store version (e.g., 3.0.0).

When you publish a CodePush update:

  • It targets users who have that build installed.

  • The update is downloaded automatically when the app launches—depending on its mandatory setting.

  • Devices will only receive CodePush updates if:

    • The associated build is successful.

    • The build does not have Force Update applied.

To access the CodePush section:

Projects → Project Detail → Build Detail → Related CodePush

CodePush updates live on the same page as the build since they inherit configuration from the selected build.

CodePush Deployment Rules:

  • Each build can have unlimited CodePush updates.

  • Every new successful CodePush overrides the previous one.

  • The most recent successful update is considered Live and is used as the active version.

CodePush Properties

The following properties define the configuration and behavior of each CodePush update:

Property
Description

Deployment ID

A unique identifier for the CodePush update.

Duration

Total execution time of the deployment process.

Mandatory

To enable users to receive CodePush updates during the Splash Screen phase, mark this field as mandatory. If left unchecked, the update will be downloaded when the user opens the app for the first time and will be installed on the second launch.

Description

Represents the notes or additional context added during the creation of the CodePush.

Target Binary Range

Refers to the store version associated with the build. This means the update will only be delivered to applications installed with this exact version.

Label

A version label is automatically added for every successful CodePush. In a new build, labeling starts from v1 and continues incrementally as v2, v3, and so on.

Live

The latest successful CodePush deployment is identified by the highest label number prefixed with "v" (e.g., v3). This label represents the most recent and active version of the deployment.

Metrics

The following metrics are provided to help you track the process for published CodePush updates:

Metric
Description

Rollout

Indicates the percentage of active users that the new update is intended to reach. Note: The default rollout value is set to 100%.

Rollbacks

Counts fallback events triggered when a device fails to apply a CodePush update. When a CodePush update fails during download or installation on a device, the previous version is automatically restored. Each such fallback event increments this value.

Active

Represents the percentage of users who have received the latest CodePush update, relative to the total user base. For example, if the app has 100 users and the latest CodePush reached 50 of them, the active percentage is 50%.

Downloads

Displays the total number of times the update has been downloaded by user devices.

Installs

Displays the total number of successful installations of the update across all devices.

Creating a New CodePush

To create a new CodePush deployment:

  1. Navigate to the build where the update should be applied.

  2. Click the +CODEPUSH button to open the creation form.

Updating an Existing CodePush

You can update a published CodePush for users who haven't received it yet:

  • Click the Edit link on the bottom right of the CodePush card.

  • Update the following as needed:

    • Description: Modify the release notes.

    • Enabled: Disable the update to revert to the previous live CodePush.

      Let’s illustrate this with an example: Suppose you have released two CodePush updates labeled v1 and v2. In this case, v2 is the current Live update. Later, you publish a third update labeled v3, which begins rolling out and takes over the Live status from v2. If you then disable the v3 update by turning off its Enabled setting, the system will automatically revert to the previous successful update—v2—and mark it as the new Live version.

    • Mandatory: Change whether the update is forced at Splash Screen or not.

Rollback a CodePush

The Rollback feature allows you to revert the latest Live CodePush update by promoting a previously published version as a new release. This is useful when the most recent deployment causes issues in production.

Example Scenario

Suppose you have the following CodePush history:

Label
Live

v3

True

v2

False

v1

False

In this case, v3 is currently the Live update.

To rollback from v3 and promote v2 as the new Live version:

  1. Click the Rollback link at the bottom right of the v3 CodePush.

  2. In the modal that appears, select v2 from the list of previous successful updates.

  3. Confirm the rollback operation.

This action does not restore v2 directly as the live version. Instead, a new CodePush update is created based on the contents of v2 and published under a new label, such as v4.

After the rollback:

Label
Live

v4 (references v2)

True

v3

False

v2

False

v1

False

v3 is no longer active, and the rollback version (v4, based on v2) becomes the new Live update.

Promote a CodePush

You can promote any previously successful (but non-live) CodePush by republishing it as a new update:

  1. Click the Promote link on the bottom right of the desired CodePush.

  2. Confirm the action in the modal window.

Once confirmed, a new CodePush will be created with an incremented label (e.g., from v2 → v4), and it will be considered the latest live update.

Last updated

Was this helpful?