Documentation

Go to Portal Website

Enforce App Update

PlanPlatformsMASVS
TeamAndroid, iOSMASVS-CODE-2

Overview

Enforce App Update forces users to update to the latest version of your application before they can continue using it. When enabled, the SDK blocks app startup and displays a non-dismissible prompt that redirects users to the App Store (iOS) or Google Play Store (Android) to download the latest version.

This control ensures all active users run the most current and secure version of your application, enabling rapid security patch deployment, critical bug fix distribution, and API compatibility enforcement.

How It Works

The Enforce App Update control operates at SDK initialization:

  1. Version Check: On app launch, the SDK attempts to fetch the latest configuration from the MobileDefender backend
  2. Enforcement Decision: The backend determines whether the current app version is acceptable based on your deployment settings
  3. Blocking Prompt: If the version is outdated or the config fetch fails, the SDK displays a full-screen, non-dismissible dialog
  4. Store Redirect: The user must tap the "Update" button, which opens the App Store or Google Play Store
  5. App Termination: After redirecting to the store, the SDK terminates the application process to prevent continued use of the outdated version

Version Discovery

Version enforcement is server-controlled. The MobileDefender backend maintains minimum version requirements per environment (development, staging, production). When you enable this control:

You do not need to hardcode version numbers in your app—all enforcement logic is managed server-side and can be adjusted in real-time through the MobileDefender dashboard.

User Experience

When a user launches an outdated version:

  1. Launch Blocked: The app displays a full-screen prompt immediately after SDK initialization, before your UI loads
  2. Message Display: The dialog shows a customizable title and message (e.g., "Update Required", "Please install the latest version to continue")
  3. Single Button: A single "Update" button is presented—the dialog cannot be dismissed or bypassed
  4. Store Navigation: Tapping "Update" opens:
  1. App Exit: After redirecting, the app terminates to prevent background usage

Customization

You can customize the enforcement prompt through the MobileDefender dashboard:

Localization is supported—you can provide translations for different languages using the <en>, <es>, <fr>, etc. syntax in your text fields.

How to Enable the Control

Navigate to Device Settings from the AppTego portal, and expand the App Lifecycle section. Under this section you will find the Enforce App Updates control. Click Enable, choose the response action, and save the configuration for the next build or for it to be applied with a live push (if enabled).

API Configuration Example

{
  "EnforceNew": {
    "detection": true,
    "action": "alert",
    "title": "Enforce App Updates",
    "message": "A newer app version is required before continuing. Please update the app.",
    "buttons": ["OK"],
    "actions": ["close"],
    "redirects": [""]
  }
}
FieldPurpose
detectionEnables app update enforcement.
actionSelects the response style, such as alert, close, log, or warn.
title / messageUser-facing text shown when a response is displayed.
buttons / actions / redirectsDefines the available response buttons and their outcomes.

Configuration

Backend Settings

Enforcement is managed via two flags in the device configuration:

Both must be enabled for enforcement to work. If LiveConfig is disabled, EnforceNewVersion is automatically disabled.

Example Configuration

{
  "EnforceNew": {
    "detection": true,
    "action": "redirect",
    "title": "<en>Update Required\n<default>Update Required",
    "message": "<en>A new version is available. Please update to continue.\n<default>A new version is available. Please update to continue.",
    "buttons": ["<en>Update Now\n<default>Update Now"],
    "actions": ["redirect"],
    "redirects": ["https://apps.apple.com/app/your-app-id"]
  }
}

iOS Redirect URL Examples:

Android Redirect URL Examples:

Caveats and Best Practices

Deployment Workflow

⚠️ Critical: Always publish your new app version to the App Store or Google Play Store before enabling enforcement. If you enable enforcement before the new version is available in the stores, users will be stuck in a loop—unable to access the app and unable to find an update.

Recommended workflow:

  1. Submit new app version to Apple App Review / Google Play Console
  2. Wait for review approval and store publication
  3. Verify the new version is live and downloadable
  4. Enable EnforceNewVersion in the MobileDefender dashboard
  5. Push the live configuration to affected environments

Edge Cases

Environments

Use environment-specific enforcement:

Threats Mitigated

Support Matrix

PlatformMinimum VersionStatus
iOS12.0+✅ Supported
AndroidAPI 21+✅ Supported

Telemetry

When enforcement blocks an app launch, the SDK logs the following events to the MobileDefender backend:

These events include:

See Also