Rollback to the old version when restart the app
Thanks so much for filing an issue or feature request! Please fill out the following (wherever relevant):
Description
I run a tabs demo project with ionic 4 and set up the codePush properly. After a new release upload to the codePush, app prompt up the update dialog as expect. And new layout update once install new version. But the layout rollback to old one when I kill the app and relaunch.
Reproduction
ionic start myApp tabs- install cordova-plugin-code-push and config deploy key
- call sync function in app.component.ts
this.platform.ready().then(() => {
// Code push callback
this.codePush.sync({
updateDialog: true,
installMode: InstallMode.IMMEDIATE
}, (downloadProgress => {
console.log('downloading: ' + downloadProgress);
})).subscribe(syncStatus => {
console.log('syncStatus: ' + syncStatus);
});
});
-
ionic cordova run iosin device.
-
add a new tab in the home page.
-
code-push release-cordova TabsDemo_ios ios -
app prompt up the update dialog and click install. Layout update with an additional tab once after install new version.


-
quit the app and relaunch it. Additional tab disappear.

Additional Information
- cordova-plugin-code-push version: 1.11.17
- List of installed plugins:
- code-push 2.0.6 "CodePushAcquisition"
- cordova-plugin-code-push 1.11.17 "CodePush"
- cordova-plugin-device 2.0.2 "Device"
- cordova-plugin-dialogs 2.0.1 "Notification"
- cordova-plugin-file 6.0.1 "File"
- cordova-plugin-file-transfer 1.7.1 "File Transfer"
- cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
- cordova-plugin-ionic-webview 3.1.2 "cordova-plugin-ionic-webview"
- cordova-plugin-splashscreen 5.0.2 "Splashscreen"
- cordova-plugin-statusbar 2.4.2 "StatusBar"
- cordova-plugin-whitelist 1.3.3 "Whitelist"
- cordova-plugin-zip 3.1.0 "cordova-plugin-zip"
- Cordova version: 8.1.2
- iOS/Android/Windows version: ios 4.5.5
- Does this reproduce on a debug build or release build?
- only debug build tested
- Does this reproduce on a simulator, or only on a physical device?
- both simulator and device
You can try:
// Calling this function is required during the first application run after an update.
// If not called, the application will be reverted to the previous version.
window.codePush.notifyApplicationReady();
Hi @chy89310, Thanks for reporting!
Yeah, that is known issue. Here is issue for that: https://github.com/Microsoft/cordova-plugin-code-push/issues/498
Could you please check it and ensure that this is the same issue or not?
As workaround you can use 1.11.15 version of cordova-plugin-code-push.
Also, Here is PR for fixing this issue: https://github.com/Microsoft/cordova-plugin-code-push/pull/520
Please feel free to ask any questions.
@alexandergoncharov thanks for reply, but either way seems not work for me.
@chy89310 , oh, yeah, could you please also update code-push plugin to lates version as it has fix for ionic4?
Just run:
ionic cordova plugin rm cordova-plugin-code-push
ionic cordova platform rm ios
ionic cordova platform add ios
ionic cordova plugin add cordova-plugin-code-push@latest
Please let me know if it was helpful or issue is still here.
Hi, I had the same issue as described. I can confirm that the issue disappeared when i upgrade to v 1.11.18
@alexandergoncharov since I using ionic 3, when I change the @ionic-native/code-push plugin to version 4.20.0, everything works as expect.
Thank you for your help again!
this.codePush.sync(); without any parm works for me