i'm working on application using ionic 4 so i try to use code-push-plugin to release updates to my app. i setup the plugin correctly and i manage to upload updates using cli to the app center but when i try to open my application nothing happens.
I use "ionic cordova build android" to generate the apk to test it in a real device
and "code-push release-cordova K4A android" to release the updates
i check the appcenter and go to staging releases and i found my releases updates
here's my code in home.page.ts
constructor( private codePush: CodePush, private platform: Platform
) {
this.platform.ready().then(()=> {
this.codePush.sync({}, (progress)=> {
}).subscribe((status) => {
if (status == SyncStatus.CHECKING_FOR_UPDATE)
alert("Checking for updates");
if (status == SyncStatus.DOWNLOADING_PACKAGE)
alert("Downloading");
if (status == SyncStatus.IN_PROGRESS)
alert("in progress");
if (status == SyncStatus.INSTALLING_UPDATE)
alert("installing the updates ...");
if (status == SyncStatus.UPDATE_INSTALLED)
alert("update installed");
if (status == SyncStatus.ERROR)
alert("Error");
})
})
and this is the config.xml
widget id="com.KO4A.KORA" version="0.0.4" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<platform name="android">
<preference name="CodePushDeploymentKey" value="TM8jRvULboCjSVhDzApTk6Yu7Kry97c78f7d-6a98-4378-a263-abd88ec58996" />
</platform>
<name>K4A</name>