App Update Plugin

I am trying to use the ionic app update plugin in my app.
I have created an update.xml file and put it on the server. the contents of the file are

<update>
	<version>19</version>
	<name>My App Name</name>
	<url>https://my.hosting-site.com/app_updater/app-debug.apk</url>
</update>

In my app’s config.xml file i have set version=“1.1.1” and android-versionCode=“18”.
Now in my app.component.ts file after platform ready is called I put in the following updater code

this.appUpdate.checkAppUpdate(updateUrl).then((update) => {
     console.log('update: ', update);
     console.log('app update available');
 }).catch((error) => {
     console.log('error: ', error);
 });

Whenever I run the app on my device it is always showing the error as

error:  Object { code: 301, msg: "version resolve fail" }

What i am doing wrong ?
Thanks in advance

1 Like

You have to put the version number according to your config.xml file and replace the points with “0” example: version 1.0.1 = 10001, keep in mind that this only works on Android, I’m looking for something similar for IOS