Best practice to force upgrade app

Hi, I would like to implement force update app to support new API changes. I got many solutions, but need adivce to follow best practices like where to extaclty check for the app version(Make API to get app version to compare). Also, would like to stop checking version(atleast for somedays) once the user update app to avoid making version check API call again.

Post not yet marked as solved Up vote post of sugan Down vote post of sugan
65k views

Replies

You didn't say what platform you're running on (macOS or iOS). If you're delivering your app through the App Store or Mac App Store, you simply provide a new version to the store and users will get it automatically.


If you're delivering a macOS app outside the Mac App Store, you have to provide the update functionality yourself. You might like to take a look as the granddaddy of update frameworks, sparkle-project.org, which is used in lots of apps and is (after a long pause) now being maintained regularly.

Thank you so for your reply .I am developing iOS app which needs force update depends an API response.

You need to publish a new version of your app when the API changes. (I'm assuming you mean something like a REST API, something supported on a server, for example.)


Users will get the new version of your app automatically (if they have chosen that Settings option) or manually. That means, when the API changes, you have a mixture of users on the old app version and users on the new app version.


That in turn means that your app has to cope with both cases. It needs to be able to query the API version (or to request something and "deduce" the API version from the result), and do one of several things:


— If it finds the old API version, it needs to continue to use the old version.


— If it finds the new API version, it needs to use the new version.


— If it finds a newer API version that it doesn't recognize, it needs to tell the user it can't do anything until the app is updated. If you've organized your release correctly, that just means the user will go and update the app.


The important thing is that your may need to be able to use (at least) two API versions, so that you can issue a new version of the app before you upgrade the server to a new API version. That's the only way to get continuity for the majority of your users.

Hi QuinceyMorris, Thanks for the detailed clarifications. Our requirement is to alert the user with two optins to navigate to App Store to update app to new version and cancel to continue using exisiting app version. Which would be the best place to check app verison condition and show alert in iOS app? Exaclty like this https://stackoverflow.com/questions/6256748/check-if-my-app-has-a-new-version-on-appstore

The problem is, you can't force users to update. If nothing else, your upgrade will be blocked if there's no network connectivity when your app runs.


For that reason, I think it's a better plan to support multiple API versions in your latest app — even if "support" means "complain about" for older API versions. Otherwise, trying to keep the app version and the API in strict synchronization seems like a recipe for pain, both for you and your users.

Curious which versions iOS your app currently supports...?

Thank you so much for your reply.I completely agree your valid solution but we are not gonna block the user. Instead we will show alert with two options to intimate user to upgrade inrorder to get more features. If they click "update" app navigates to App store app to continue. If click "Cancel" they can continue using app.

I have an app downloaded that will not let me update and access because of the developer. There’s saved data on this app that I would like to recover. Recommendations?

If you are looking for an easy to integrate built in solution. You can use App Upgrade (Google it, url is not permitted here) service to force update you mobile apps. You need to create new version for your app versions you want to update in the app upgrade service and select whether you want to force it or just want to let users know that new version is available.

after this you will need to call the appupgrade api from your app with the required details such as your app version, platform, environment and app name. The API will return you the details.. that this app needs to be updated or not. Based on the response you can show popup in your app.You can call this API when app starts or periodically to check for the update. You can even provide a custom message.

API response:

See the response has force update true. So handle in the app by showing popup. 

You can find the complete user documentation in the website.

Thanks.

For that reason, I think it's a better plan to support multiple API versions in your latest app — even if "support" means "complain about" for older API versions. Otherwise, trying to keep the app version and the API in strict synchronization seems like a recipe for pain, both for you and your users.

The opposite is true. The development cost of supporting multiple API versions is massive which means devs have much less time to spend fixing bugs, adding new features and generally improving the user experience.

Being able to guarantee that all apps are in sync with the newest API version is a big win for everyone, both users and developers.

That's the only way to get continuity for the majority of your users.

Not true in 2023. We can use over the air updates to force upgrade application code without having to install a new App Store version.