Hotpatch overview

Updated at:

Hotpatch fixes bugs in a live app without releasing a new version.

Scenarios

Each Hotpatch is an emergency release. Therefore, mPaaS restricts Hotpatch to situations where you must immediately fix an issue on a live client when there is no time to release a new version.

As a best practice, use Hotpatch only for critical, widespread, and highly reproducible issues. These include, but are not limited to, the following:

  • Frequent crashes

  • Critical UI issues

  • Bugs that may cause financial loss or user complaints

  • Client features that are not working

  • Urgent changes required by regulatory review

Usage notes

  • The Hotpatch feature for iOS is supported only in Apsara Stack environments. This feature is not available in public cloud environments.

  • Android supports two Hotpatch methods: DexPatch and InstantRun.

  • Using Hotpatch involves calling the update and release API of Mobile Delivery Service (MDS). This action incurs API call fees.

    For more information about billing for real-time publishing, see Pricing.

Comparison of DexPatch and InstantRun

Item

DexPatch

InstantRun

Package size

No instrumentation required. No change in size.

Instrumentation required. Package size increases.

Takes effect immediately

No, a restart is required.

Takes effect immediately under specific conditions.

Always takes effect after a restart.

Supports .so file fixes

Not supported

Support

Supports resource file fixes

Not supported

Support

Additional dependencies

None

Depends on the Gradle plug-in for instrumentation.

Note

Do not use both Hotpatch methods in the same app version. You can switch between methods across versions.