I’m trying implementing Ionic Deploy with ionic v1 (v1.3.1), but when the app loads a downloaded and extracted update, the app crashes. Debugging remotely the app, I see that, after the update, the console shows this error:
GET file:///data/user/0/com.example.www/app_12b7t876-f543-098j-b65f-6h9u098jh123/cordova.js net::ERR_FILE_NOT_FOUND
Using an absolute url to referencing the cordova.js file I was able to see it working on Android, but I think that this is not the right way, specially because on iOS the url is different:
<!-- <script src="cordova.js"></script> -->
<script src="file:///android_asset/www/cordova.js"></script>
How I need to reference the cordova.js file?
I tried commenting out the cordova.js (or removing it) from index.html, but didn’t work also.
Maybe I missing something more?
Thanks!
Hoping that will help someone, here’s my full implementation:
config.js
$ionicCloudProvider.init({
core: {
app_id: 'myappid',
api_key: 'myapikey' // ApiKey is mandatory for ionic deploy??
},
insights: {
enabled: false
}
});
run.js
$ionicDeploy.channel = 'dev';
$ionicDeploy.check().then(function(snapshotAvailable) {
if (snapshotAvailable) {
$ionicDeploy.download().then(function(res) {
return $ionicDeploy.extract();
}).then(function(res) {
return $ionicDeploy.load();
});
}
});
Ionic Info:
global packages:
@ionic/cli-utils : 1.4.0
Gulp CLI : CLI version 1.2.2 Local version 3.9.1
Ionic CLI : 3.4.0
local packages:
@ionic/cli-plugin-gulp : 1.0.1
@ionic/cli-plugin-ionic1 : 2.0.0
Ionic Framework : unknown
System:
Node : v6.9.1
OS : Linux 4.4
Xcode : not installed
ios-deploy : not installed
ios-sim : not installed
npm : 4.5.0
Installed platforms:
android 5.1.1
Cordova plugins:
ionic-plugin-deploy 0.6.7 "IonicDeploy"