I’m trying to live update my Ionic 2 app using Ionic Deploy.
import { Deploy } from '@ionic/cloud-angular';
...
ngOnInit() {
if (env === 'cordova') {
this.deploy.check()
.then(snapshotAvailable => {
if (snapshotAvailable) {
this.deploy.download()
.then(() => this.deploy.extract());
}
});
}
}
I deploy and run the app with cordova run android
, start the Chrome Inspector with USB Debugger and read the console.
Ionic Deploy finds an update, downloads it and extracts it. No problem.
But, the next time I start the app it hangs on the splash screen, no console output and nothing happens.
In the URL I see that it switched to file://…/app-UUID/index.html, so everything looks right.
"@ionic/cloud-angular": "^0.9.1",
ionic -v 2.2.1
cordova -v 6.5.0
<plugin name="ionic-plugin-deploy" spec="~0.6.5" />
<plugin name="cordova-plugin-device" spec="~1.1.4" />
This is the console output
DEVICE READY FIRED AFTER 1785 ms
Ionic Deploy: an update is available
Ionic Deploy: download complete
Ionic Deploy: extraction complete
After extraction it hangs. Any ideas?