ben-ng / phonegap-air

Put your web app in the iOS App Store and update it whenever you want.
304 stars 26 forks source link

Bailout #2

Open ben-ng opened 9 years ago

ben-ng commented 9 years ago

There should be a copy of the "last known good version" somewhere, so that if the app fails to respond after a certain amount of time, a revert can be done.

This should probably be implemented with another global function. The native code will poll this function for X seconds, and if it doesn't return true in that time, declare the version dead and revert to the last known good one. This could be the one sitting in the app bundle.

ptim commented 8 years ago

Sweet! I wonder if there's something to be learned / leveraged from Percolate's Meteor package: https://github.com/percolatestudio/cordova-plugin-safe-reload

ben-ng commented 8 years ago

That's one way to do this.