Skip to content
This repository has been archived by the owner on Oct 1, 2018. It is now read-only.

cordova hot code push plugin , changes are gone after restarting the applicaiton #369

Closed
ratnakar24 opened this issue Aug 20, 2018 · 3 comments

Comments

@ratnakar24
Copy link

I'm developing an ionic application and i'm using cordova hot code push plugin. I'm able to successfully fetch the update and install it and it shows the changes too. But once I close the application and clear it from the RAM and re open it, the changes are gone and I get an error that Nothin new to download from the server.

My app.component.ts

fetchUpdate() {
  const options = {
  'config-file': 'http://bwvdenv1.asia.manh.com/Warehouse/chcp.json'
};
chcp.fetchUpdate(this.updateCallback, options);
}

updateCallback(error, data) {
  if (error) {
   console.error(error);
    } else {

         chcp.installUpdate(error => {
           if (error) {
             console.error(error);
             window["thisRef"].alertCtrl.create({
               title: 'Update Download',
               subTitle: `Error ${error.code}`,
               buttons: ['OK']
             }).present();
           } else {
             console.log('Update installed...');
           }
         });

  }
}

My cordova-hcp.json

{
  "name": "hot-code-push",
  "ios_identifier": "",
  "android_identifier": "",
  "update": "start",
  "content_url": "http://bwvdenv1.asia.manh.com/Warehouse"
}

My config.xml

<chcp>
    <config-file url="http://bwvdenv1.asia.manh.com/Warehouse/chcp.json" />
    <auto-download enabled="false" />
    <auto-install enabled="false" />
</chcp>

Cordova-hot-code-push-plugin version 1.5.3

@amosbaby
Copy link

amosbaby commented Sep 4, 2018

You can check if new app content applied in your url http://bwvdenv1.asia.manh.com/Warehouse. If not, maybe you upload wrong version

@ratnakar24
Copy link
Author

Thanks for your response. I was able to solve the issue by removing cordova-plugin-ionic-webview which comes by default and adding cordova-plugin-WKWebView-engine

@nordnet-deprecation-bot
Copy link
Contributor

👋 Hi! Thank you for your interest in this repo.

😢 We are not using nordnet/cordova-hot-code-push anymore, and we lack the manpower and the experience needed to maintain it. We are aware of the inconveniece that this may cause you. Feel free to use it as is, or create your own fork.

🔒 This will now be closed & locked.

ℹ️ Please see #371 for more information.

@nordnet nordnet locked and limited conversation to collaborators Sep 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants