Is there a way to just re-create the Cordova build instead of resetting the whole project?

Quite often, the hot-code reload mechanism breaks my whole app, so I have to delete it from the device and re-install it, e.g. by starting it from Xcode for iOS devices. Problem is, that in this case the app is not deployed in its last development state, but rather in an older state - and a new hot code reload takes place right after the app came up. This is quite annoying, since it can happen that this hot code reload breaks the app again. The only solution to prevent this I’ve found so far is to make a meteor reset, but in this case I also lose my whole database. So I am asking myself if there is another way to just rebuild the Cordova part of the application from scratch? Is it safe to just delecte the cordova-build folder (or a part of it) to trigger this? And if so, is there a way to do this without forcing Cordova to also download all plugins again - which is taking ages in my case.

1 Like

There is no way to do this without also redownloading the plugins (although at least the ones downloaded from npm should be cached), but removing .meteor/local/cordova-build will indeed force the Cordova project to be recreated. Note however, that this will also recreate the Xcode project, so if you have it open you will be prompted to close it.

Hi,
I find much of the Cordova-enabled app development in Meteor to be poorly documented. There is still some caching that I don’t always understand. If I had to do what I’m doing over again, I probably would have built the Cordova stuff in a Cordova app and then added Meteor. I don’t really trust how the code is handed to XCode, so I restart xcode and do a build clean everytime before I try it on a device. I’m using a real camera, so the sim doesn’t work for me most of the time.

Two points though:
For the Cordova plugins I’m using, I added them to the local file system in a /private directory. Then did meteor add cordova:reversename@file://./private/plugins…

Secondly, since Meteor reset seems to be the only way to fix the build often, you should setup a standalone Mongo installation and point to it. I put one on my NAS.

What is the impact of the MDG: reload on resume?

Thanks for your quick reply!