Skip to content
MZMuse
Go back

The Quest For a Hybrid Mobile App

Every now and then I do a mobile application, and it’s always desirable to have an app running on both Android and IOS. Large teams and companies can afford to have separate teams for each platform( although managing two growing code-bases is still a hassle), however for smaller teams and business it would cost too much to develop to separate apps for each platform.

I’ve been in a similar position (twice) where I had to build an app for both Android and IOS and I used  Cordova (Ionic Framework) in the first application, and React Native for the second. the following is supposed to be a summery of my experience which will highlight strength and weakness of each.  

Ionic Framework

Around two years ago I worked on an educational web app for a client using Angular. It had a lot of interactions and building it as a SPA(single page app) was the right choice. Fast forward a couple of months the client requested the web app to be converted to a mobile app targeting both IOS and Android.

After doing some research, I settled on using Ionic Framework for a couple of reasons

All went well on IOS, the application was decent performance wise, The view transition animation is fluid, and generally speaking the app is pleasant. However trouble started on Android. Thanks to the old naughty Android Browser (which powers Android WebView on older Android versions < Lollipop) a lot of CSS and JS broke. Now the solution to this problem is to use Corsswalk-Project , which is essentially a Chrome based webview. 

sad

Crosswalk is great, it fixed most of my problem with its magical wand except for one. Now a simple HelloWorld apk is around 30mb  (when installed it exceeds 50mb). Todays devices can handle such installation size and PlayStore allows you to upload an apk up to 100mb, but the client wanted the app to run offline without the need to download any extra data. The data was around 60-70 mb and had to bundled with the apk, which meant I exceeded the PlayStore max apk size limit. In order to ship the app we had to compress the audio and images a lot ( which sometimes led to very bad quality content) in order to reach <100mb.

Another problem I noticed on Android even with Crosswalk, on older devices the Animations were  jittery and sometimes nonexistent because the app was running on low FPS.

On Android Lollipop and higher the app didn’t need Crosswalk (both CSS and JS worked fine) and was responsive, because Lollipop and higher versions ship with a WebView that’s based on Chrome, which gets updated regularly via PlayStore, but sadly Android Kitkat and below still make a good chunk of the devices on PlayStore and can’t be excluded 

React Native

Few months ago I started working on a mobile application targeting both Android and IOS. After my experience with Cordova I wanted to look for an alternatives and finally settled on React Native by Facebook.

Alas everything has pros and cons and React Native is no exception. 

Native Script

When doing my search I came across another competitor called NativeScript by Telerik. It uses Angular2 and Typescript. I had a couple of issues when testing it out. Please bear in mind that I tried NativeScript many months ago and probably these issues have been fixed by now

NativeScript has an amazing feature; You never need to write native code. The whole underlying API is available via JS.

Summary

Every solution has it’s pros and cos. Cordova combined with Ionic2 is a great solution, however Android is its Achilles heel for the reasons I mentioned above. Cordova has been around for a very long time and it has matured. You’ll hardly deal with any native code.

React Native is still the new kid in town, I enjoyed working with it and I will definitely use it again for any future apps. It has its downsides but I think they will slowly get better in time as more people start using it. Hell if I ever need to write an IOS only app, I might even use React Native as I hardly had any problems on this platform.

I think NativeScript are trying to do far too many things. The reason why ReactNative is stable, is because it focuses on less responsibilities. If you need a functionality not available via ReactNative or some plugin then you have to get your hands dirty with native code.  I don’t know how far NativeScript has improved since I tried it, or whether the issues i faced have been fixed but for the time being I’ll stick with my new favorite toy React Native.


Share this post on:

Previous Post
Monitor Java Threads Context Switching
Next Post
A Quick Guide To SEO