logo

How to force update a mobile app when a new version is available?

by Yerem Khalatyan

July 12, 2022

This is one of the frequently asked questions by mobile developers. And still, we find it helpful to share our experience and recommendation for this case.

First of all, let’s understand the problem. Many users may argue that you need to release the new version and App Store and Google Play will handle the distribution for all users. And users will automatically get new updates installed if the appropriate settings are ON. While in most cases this is true and you should not force your users to upgrade to every new version, there still can be cases when you have to get rid of older versions.

Here are some real-world examples from our experience:

  • If your app is using server-side APIs to get data, then inevitably there will be API changes during the active development period. While it is a good practice to have backward compatibility, you can’t endlessly support the old versions, and one day you would love to upgrade all order users and get rid of that deprecated API.
  • Sometimes, there are some nasty errors pushed to the production, and you only realize it when users start complaining. In this case, you just quickly give a hotfix and wish all your users will get the new fixed version immediately.
  • For collaborative applications, when you support multiple platforms (iOS, Android, web) you need some breaking changes to be pushed for all versions.

Now when the problem is obvious, let’s understand what is the solution?

Unlike web applications, when the mobile app is installed on the user’s device you have no control already. Unfortunately, there is no built-in solution, that works for both App Store and Google Play, to force users to update their installed application versions. App Store doesn’t have a solution at all, and the Google Play solution works only for applications installed from Play (I have covered that part also later in this article).

We have developed our solution, which is very simple and yet very powerful. This solution was developed and improved over 8 years and helped us to maintain dozens of live mobile applications during the active development period.

Each application contains its build number, which we increase with every build. And on the server, we have a simple /supported-versions API route, which is called whenever the mobile app is launched. This route returns:

Version Control JSON

And every time we check the current build version with server-supported versions. If the current version is below the min-supported-version then we force users to update by redirecting them to App Store or Google Play page.

If the current version is higher than min supported but below the target we just show a recommendation dialog asking to update with a “skip for now” option.

Recommendations and best practices

  1. Make sure the version control is integrated into the application before the first public release
  2. It is better to store supported versions in a JSON file, that could be edited without making server releases since the app version updates are separate from server releases.
  3. Note that once the application is released, it will not immediately get available for all countries, or regions. So, before making a forced update for the latest version it is better to wait one day.
  4. If it is not a critical bug fix, then we recommend using a smooth update process. Here is our typical process: once the app is released we wait 2–3 days, in this period the users who have auto-update enabled will automatically get the latest version. Then for one week, we will make it a recommended update with an option to skip it since users may not have a data connection to install a new update. Only after that once the majority of active users are upgraded, we make it a force to upgrade.
  5. On Mobile applications displaying the current version is another good practice to support. If the application has a left sidebar, you can display it there or add it to the help/settings page.

In-app updates by Google Play

As I mentioned earlier in this post, Google Play has provided its own functionality to control and force update Android app versions.

For technical implementation details, you can check the official documentation here.

How it works

  • With each new version, you set a Priority from 1 to 5.
  • Inside the application, you can request new available app versions with their priorities and make a decision if it is a critical update or a nice-to-have feature.
  • You can also check how many days were passed from the last update suggestions.
  • If you want to update to a certain version, then you just make that build version priority 5, and then on the next app launch time users will be forced to update if using older versions.

Disadvantages

  • It works only for Android applications. If you support both iOS and Android platforms, then this solution is not useful.
  • It also doesn’t support Android applications installed from other marketplaces (e.g. Huawei store).
  • The existing versions’ priorities could be changed only by making an API, couldn’t find any UI dashboard to explicitly manage supported versions and priorities.

InConcept Labs © 2022 All Rights Reserved

contact us