Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/aravind3566/react-native-in-app-updates/llms.txt

Use this file to discover all available pages before exploring further.

UpdateFlow is a TypeScript enum exported by react-native-in-app-updates that controls which Google Play in-app update strategy is used when checkForUpdate finds a new version. Choosing the right flow is an important UX decision — one lets users keep working while an update downloads in the background, while the other blocks the app entirely until the update is installed.

Enum definition

export enum UpdateFlow {
  IMMEDIATE = 'IMMEDIATE',
  FLEXIBLE  = 'FLEXIBLE',
}
Both members are string enums, so their runtime values are the plain uppercase strings 'IMMEDIATE' and 'FLEXIBLE'. The native Kotlin layer reads the string value directly (case-insensitively) and routes to the corresponding AppUpdateType constant.

Members

UpdateFlow.FLEXIBLE
'FLEXIBLE'
Starts a background download. The update is downloaded silently while the user continues to interact with the app. Once the download finishes (InstallStatus.DOWNLOADED), the native module automatically calls AppUpdateManager.completeUpdate() to apply it.Use FLEXIBLE when:
  • The update contains non-critical improvements or new features.
  • You do not want to interrupt an active user session.
  • You are comfortable with the user potentially running the old version for a little longer.
The promise returned by checkForUpdate resolves to "Flexible update started" immediately after the Play Store UI is launched — it does not wait for the download or install to complete.
UpdateFlow.IMMEDIATE
'IMMEDIATE'
Launches a full-screen, blocking update UI. The user cannot interact with the app until they either complete the update (which restarts the app) or cancel. Google Play will re-surface this prompt every time the app is opened until the update is applied.Use IMMEDIATE when:
  • The update is critical — for example, it fixes a security vulnerability or an API breaking change.
  • Running an outdated version would lead to data corruption or a broken experience.
  • You need a strong guarantee that users are on the latest version before they can proceed.
The promise returned by checkForUpdate resolves to "Update flow finished" only when the Activity returns RESULT_OK. In production this is rarely observed because the app restarts as part of the install; you will see it most often when testing with isMock: true.

Import

import { UpdateFlow } from 'react-native-in-app-updates';
Both UpdateFlow and checkForUpdate are named exports from the same entry point, so you can import them together:
import { checkForUpdate, UpdateFlow } from 'react-native-in-app-updates';

Comparison

import { checkForUpdate, UpdateFlow } from 'react-native-in-app-updates';

// Non-blocking: resolves as soon as the download starts.
// The user keeps using the app while the update downloads.
const result = await checkForUpdate(UpdateFlow.FLEXIBLE);
// result === "Flexible update started"

Choosing the right flow

CriteriaRecommended flow
Routine feature releaseFLEXIBLE
Security or data-integrity fixIMMEDIATE
Breaking API change (server-side)IMMEDIATE
Background performance improvementFLEXIBLE
Update priority set to 4–5 in Play ConsoleIMMEDIATE
You want the user to stay in-appFLEXIBLE
Google also exposes an update priority (0–5) and staleness (days since update became available) through AppUpdateInfo. You can use those signals to programmatically escalate from FLEXIBLE to IMMEDIATE if the user has ignored a flexible prompt for too long — see the full guides for concrete examples.
Google Play controls whether a given update type is actually allowed for a particular update — even if you request IMMEDIATE, the Play Store may reject it. The native module surfaces this as a NOT_ALLOWED rejection from checkForUpdate. Handle it by falling back to the other flow type. See checkForUpdate error codes for details.

Full usage guides

For complete, production-ready code showing how to handle download progress, user prompts, and install completion events, see the dedicated flow guides:
  • Flexible Update Guide — handling background downloads, InstallStatus events, and the “restart to apply” prompt.
  • Immediate Update Guide — handling user cancellation, re-prompting on next launch, and priority-based escalation.

Build docs developers (and LLMs) love