3
votes

I'm developing a phonegap app and hot code push is causing a problem for some of my users (after push, app hangs and users have to re-install the new app).

I'd like to disable hot code pushes and found the following snippet but am getting the error, "TypeError: Cannot call method 'onMigrate' of undefined"

Meteor._reload.onMigrate(function() {
    return [false];
});
2

2 Answers

4
votes

Looks like the _reload object is only available on the client. I moved the snippet of code to a client directory and that solved it.

Leaving this question / answer here for anyone else who might come across it.

1
votes

You can set the environment variable AUTOUPDATE_VERSION to something static. You need to set this environment variable when you build your app and when you start the server. (Source)