Check out Ionic Enterprise

App Update

Improve this doc

This plugin does self-update for android

Repo: https://github.com/vaenow/cordova-plugin-app-update

Installation

  1. Install the Cordova and Ionic Native plugins:
    $ ionic cordova plugin add cordova-plugin-app-update
    $ npm install --save @ionic-native/app-update
    
  2. Add this plugin to your app's module

Supported platforms

Usage

You should first host an XML file on your server with the following data in it:

<update>
    <version>302048</version>
    <name>APK Name</name>
    <url>https://your-remote-api.com/YourApp.apk</url>
</update>

Then use the following code:

import { AppUpdate } from '@ionic-native/app-update';

constructor(private appUpdate: AppUpdate) {

   const updateUrl = 'http://your-remote-api.com/update.xml';
   this.appUpdate.checkAppUpdate(updateUrl);

}

The plugin will compare the app version and update it automatically if the API has a newer version to install.

Instance Members

checkAppUpdate(updateUrl)

Check and update

Param Type Details
updateUrl string

update api url

Returns: Promise<any> Returns a promise that resolves when something happens

API

Native

General