Reputation: 71
Upon loading an iOS application in Cordova. Cordova starts downloading files through cordova_autoupdate.js. How do I limit this, or even disable this completely? It is creating performance headaches!
I have tried:
if (Meteor.isCordova) {
Meteor._reload.onMigrate(function() {
return [false];
});
}
but that doesn't work.
I have also tried to set the enviornment variable (AUTOUPDATE_VERSION) to bypass hot code push. But doesn't work:
if (Meteor.isServer) {
process.env.AUTOUPDATE_VERSION = 'false';
}
Upvotes: 3
Views: 911
Reputation: 71
In the end I just changed the autoupdate package after building it. I put this as part of my readme:
You will need to go into project/www/application/. There is a .js file (usually prepended by a large alphanumeric value eg. 826e1dd622c68e4b1adccfeb2bbf339d89af041f.js). Open that file and look for autoupdate_cordova.js. Next to it are values t=30, s=5. Change these to t=0, s=0. It will stop the autoupdate download from running (t is max concurrent downloads, and s is the retry count). Please look at the following link for more information on the autoupdate package: https://github.com/meteor/meteor/blob/devel/packages/autoupdate/autoupdate_cordova.js
Upvotes: 2
Reputation: 301
Did you turn off autopublish? Link to Todo Tutorial Disable Autopublish step. From your folder, you'll need a command prompt, Git Bash, or whatever you're using to start your local instance. meteor remove autopublish will remove that module. I'm not particularly familiar with iOS, but if Meteor is requesting through autopublish, it would seem that Cordova is attempting to deliver.
Also, from the docs, same info
Upvotes: 0