How do you reliably prevent Meteor Cordova iOS from losing its local server connection?


I know this problem has been discussed several times here and on GitHub (see this issue for example) but it appears to remain unsolved, at least in latest Meteor versions. I made tests with 1.6 and 1.6.1 beta 5 and all my apps, even fully fresh blank projects, systematically break after putting an iOS device to sleep.

I have tried many suggested workarounds (installing cordova-plugin-device, reconnecting manually when the app comes back to front, etc. ) with no success, meaning I can no more update my apps that are currently on the App Store.

This is such a major issue, one that any developer should notice when testing an app, that I am beginning to wonder if Meteor Cordova is stil being actively used in production. But perhaps I simply missed an obvious solution… in which case I’d be very grateful if someone could explain it :slight_smile:

The problem is in the cordova-plugin-meteor-webapp. I did a pull request:

there you see also a forked version that you can try to install. This fixed the issue for me.

The reason why this is not merged yet is also mentioned there. Basically the project that the local webserver is based on has also an open pull request for that issue and i really don’t know why this is not merged yet.

1 Like

What worked for me is stick with the 1.4.1 version of cordova-plugin-meteor-webapp :slight_smile:

1 Like

Wow, just wow : after a few hours, problem solved :grinning:

@macrozone, I installed your forked version and it works perfectly with all my apps.

Thank you so much to both of you !

1 Like