> For the complete documentation index, see [llms.txt](https://docs.digit.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digit.org/mgramseva/introducing-mgramseva/product-docs/functional-docs/app-force-update.md).

# App Force Update

Update the app in case of new release/enhancements

## Overview <a href="#overview" id="overview"></a>

Show Update App popup to end users in case there is a new release in the Google Play Store or IOS App Store.

## MDMS Configuration <a href="#mdms-configuration" id="mdms-configuration"></a>

Add the file (link below) in the common-masters MDMS -

[<img src="https://github.com/fluidicon.png" alt="" data-size="line">mdms-mgramseva/AppVersion.json at UAT · misdwss/mdms-mgramseva](https://github.com/misdwss/mdms-mgramseva/blob/UAT/data/pb/common-masters/AppVersion.json)

Update the version in the above-mentioned file whenever a new release is deployed to the Play Store or App Store.

{% hint style="info" %}
**Note: The version deployed in the Play Store and App Store should match the version in** [<img src="https://github.com/fluidicon.png" alt="" data-size="line">mdms-mgramseva/AppVersion.json at UAT · misdwss/mdms-mgramseva](https://github.com/misdwss/mdms-mgramseva/blob/UAT/data/pb/common-masters/AppVersion.json)
{% endhint %}

{% code lineNumbers="true" %}

```
{  "tenantId": "pb", 
 "moduleName": "common-masters",  
"AppVersion": [    
{      
"latestAppVersion": "1.2.0",      
"packageName": "com.dwss.mgramseva"    
} ]  
}{  "tenantId": "pb", 
 "moduleName": "common-masters",  
"AppVersion": [    
{      
"latestAppVersion": "1.2.0",      
"packageName": "com.dwss.mgramseva"    
} ]  
}
```

{% endcode %}

### **Version Check Logic**&#x20;

```
commonProvider.getAppVersionDetails();
```

The MDMS call is made every time a user opens the app.

Once the ViewBuild() displays a pop-up on the landing page widget, it validates if the package version matches the version in MDMS.

{% code lineNumbers="true" %}

```
await commonProvider.getAppVersionDetails();
CommonMethods()
    .checkVersion(context, commonProvider.appVersion!.latestAppVersion);
```

{% endcode %}

```
CommonMethods()
    .checkVersion(context, commonProvider.appVersion!.latestAppVersion);
```

### Primary Files <a href="#primary-files" id="primary-files"></a>

[<img src="https://github.com/fluidicon.png" alt="" data-size="line">punjab-mgramseva/main.dart at master · misdwss/punjab-mgramseva](https://github.com/misdwss/punjab-mgramseva/blob/master/frontend/mgramseva/lib/main.dart)

[<img src="https://github.com/fluidicon.png" alt="" data-size="line">punjab-mgramseva/common\_methods.dart at master · misdwss/punjab-mgramseva](https://github.com/misdwss/punjab-mgramseva/blob/master/frontend/mgramseva/lib/utils/common_methods.dart)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.digit.org/mgramseva/introducing-mgramseva/product-docs/functional-docs/app-force-update.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
