I’d like to understand more the pros and cons of using the MDG cordova wrapper vs. just building a basic android webview wrapper app. It’s not very clear what MDG ( @slava ) built on top of cordova.
With the MDG cordova build:
- local webserver is running. what are the benefits of this?
- login/cookies seem to work well
- can use other cordova plugins
- when it works, its simple
- images are “cached” but all the assets download every time there’s a code update (bad)
- doesn’t properly support android crosswalk chrome webview atm
- can’t use new ios WKWebView yet link
- fragile process with many layers. when it doesn’t work, good luck
With a native wrapper app
I need to use chrome webview, had trouble with crosswalk build, so I built my own simple android wrapper. This ended up being much quicker than all the time wasted messing with cordova build, and feels much more solid.
- can use a chrome webview with no problems or waiting for cordova to support it
- build process is fast and rock solid, all the native tools are available
- can add my own extensions easily - all native SDKs are available, tho it takes some bridge/wrapper work
- if you’re just opening to a hosted meteor site, you get all the “code update” stuff too
- Tweaking to support cookies was a bit more time and still not perfect. I’m having an issue where when the app auto-updates, all cookies seem to get cleared
- can’t use cordova plugins? but you can use any native SDK or API with a little work
- little more work to setup
So overall, doing your own native wrappers really isn’t that much work, and gives a lot more build stability and flexibility.
You could do things like implement your own image caching code to prevent downloading assets every time there’s a code push.
I’m wondering if I’m missing something related to the local webserver benefits. Is this somehow running the JS server side code locally on the device, but using a remote mongoDB connection? Or is there some other magic benefits to the MDG cordova wrapper?
Are there other problems expected of just a plain webview that running the local webserver helps?
I guess this will be a moot point soon when reactnative supports android. Why would you use phonegap when you can use RN to get a hybrid app with native navigation and occasionally a meteor webview.
If anyone’s interested I’d be happy to share the lean mean android wrapper.