What is best practice to handle app updates from the app store - the ionic way?

Can some one share a good way to handle application update from the app store and possibly how to redirect the user to the app store?

I am thinking to do a simple API call to the my server to check for current app version but I don’t know how to make a link to my app in the app store ( iOS - android ). do you guys have a good suggestion to handle this?

I think that you can link to the web version of the app in each app store and iOS/Android will open them in the appropriate App Store/Google Play

@danmilner something like so:

<a href="example.com">new version is available</a>

You’ll need to use JavaScript to open it in the system browser instead of your app view. Something like:

window.open(‘http://yoururl.com’, ‘_system’);

After looking into this a little more, I think a good way to go about this is creating a directive that will check the current app version via an API call. I did something like this for now

  $http.get('https://example.com/api/version').success(function (version) {
            var updateApp = document.getElementById('updateApp');
            if(version != '1.0.0'){
                $scope.appUpdate = true; // displays an update link
                updateApp.setAttribute('href', 'javascript:window.open("itms-apps://appstore.com/exampleApp", "_system")')
                updateApp.setAttribute('href', 'javascript:window.open("https://play.google.com/store/apps/details?id=com.example", "_system")')
                $scope.appUpdate = false;

using itms-apps://… avoids redirects. More related readings for iOS could be found here:


Thanks to @dmilner for the tip to use JS.

I get the newest App Version from the server and pass it to this function that compares and if outdated, it opens Google Play Store or Apple App Store directly to my app’s page. You need to replace the links with your app page.

Also, the app version comparison is done using NPM plugin compare-versions.

function shouldUpdate(newestAppVersion) {
    // if THIS_VERSION >= newestAppVersion, does nothing
    if (newestAppVersion === undefined
        || $window.compareVersions(newestAppVersion, THIS_VERSION) <= 0) {
        return false;

    if (ionic.Platform.isAndroid()) {

    } else {
        // iOS