I have an Ionic v1 app with ionic deploy. When my app starts up in the angular.run() block I have some code checking for a snapshot.
$ionicDeploy.check().then(function (snapshotAvailable) {
if (snapshotAvailable) {
$ionicDeploy.download().then(function () {
return $ionicDeploy.extract().then(function() {
$ionicPopup.show({
title: 'Update Available',
subTitle: 'An update was just downloaded. Would you like to restart your app to use the latest features?',
buttons: [
{
text: 'Cancel'
},
{
text: 'Restart',
onTap: function(e) {
$ionicDeploy.load(); //no code past here will be executed
}
}
]
})
})
})
}
});
After the app applies the snapshot, it applies ionicCacheBuster to all of the calls. settings.controller.js?ionicCachebuster=67772:644 I don’t know why it does this and I also notice that my app is slower than if I just type ionic run android into the command line.
Furthermore, when I call $ionicDeploy.load(); the onDeviceReady and run block of the app is not called. It just goes right to the home page. How can I get it to fully reload the app?