I am using plugin https://github.com/Microsoft/cordova-plugin-code-push#codepushnotifyapplicationready
After new version of app is pushed I can see that app was updated on my device after I launched it. In console I can see that everything is fine, but after closing and starting app again it shows me old version, but saying that App is up to date.
In console I can see that this.codePush.getCurrentPackage()
really shows the last and proper update description, but the content isn't fine.
My update code is very simple:
checkCodePush() {
this.codePush.sync({
updateDialog: {
appendReleaseDescription: true,
descriptionPrefix: "\n\nChange log:\n"
},
installMode: InstallMode.IMMEDIATE
}).subscribe(
(data) => {
console.log('CODE PUSH SUCCESSFUL: ' + data);
},
(err) => {
console.log('CODE PUSH ERROR: ' + err);
}
);
}
For more, I can say that when I plug in my phone to Chrome Dev Tools and update app for the first time, then it is okay, but after I refresh the page there is an information that page couldn't be loaded because of missing http://file///data/user/0/io.ionic.starter/files/codepush/deploy/versions/961f76070b3b2dbff9ba5883c5b2d1b2db5f3a267d87a24d9688c761040e7b51/www/index.html
Also, there isn't any info about rollback.
I will appreciate any help.
It really sounds like the "notify application ready" may not be called right away at app startup. I would put that as close to the platform ready event firing as possible:
CodePush.notifyApplicationReady();
Also, when your Android device is connected, you could run below to get some code-push specific log info. That may help chase down what you're seeing too:
code-push debug android