Hello

Let's work together.
Have a Project in mind? Contact Us
14 Jul 2016

Native vs Cross-Platform Mobile Applications — The Great Debate

Cocoon Creations
Since I’ve been asked to offer my opinion on the matter too many times lately here it goes:

During the last few years the mobile market has grown in a pace that is so fast than sometimes even me, a mobile developer, feel that I cannot keep up. And as the market grows everybody is looking to build the next great mobile app. Of course optimally you want to cover as much user base as possible. Unfortunately this means supporting quite a few different operating systems. Now this is the answer I give to every customer who asks how many operating systems a mobile application should support: iOS and Android. That’s more than 90% of the market. Blackberry is dying and Microsoft already focused Windows 10 on PC’s and tablets mostly. The addition to cost and time is substantially larger than the percentage of users you will gain. And once we get past this, the next question is: Should you go native or build a cross platform app? And the correct answer is: there is no correct answer! Sounds a lot like a politician’s answer when asked to comment on a controversial subject and he is trying to keep everybody happy. Very useful, huh?

What’s the difference between a native and a cross platform mobile app?

Native development means using the platform-specific tools provided for the mobile operating system by Apple and Google. For Android is Java as a programming language and the Android SDK, for iOS is either Objective C or Swift as a programming language and the iOS SDK.

Cross-platform development is a solution in which one code base (usually HTML5/CSS and JavaScript) is used which is then compiled for multiple platforms. You can choose to use one of the many available solutions (Appcelerator, PhoneGap, Xamarin, Corona SDK, Unity) or write the code from scratch. Then you can wrap the code in a web view container. Some solutions go as far as claim that they compile the code into native but that is not exactly true.

Now that we sorted out the terminology let’s go back to the original question: Native or Cross-Platform? There is a longer answer that is much more enlightening but before I go on I want to set the record straight. The short version of the long answer is still there is no correct answer!

First every situation is different and for every mobile app the developer has to weigh in the pros and cons of both solutions against the needs based on the mobile app requirements and make a decision. The right answer lies in balancing out cost, time to market, app performance and providing a great user experience.

The Answer

In certain cases the answer is easier: Are you building a 2D game? Choose Corona SDK. Will your app have a lot of 3D graphics? If you can afford it choose Unity. When high performance is essential, when you need to process large amount of data on the client side or when your app relies heavily on native capabilities of the OS (like Location, Push Notifications or the Camera) you have no choice (if you are sane) than to go native. Are you just trying to get an app in the app store presenting your company because everybody has a mobile app? A better solution is a responsive / mobile optimised website.

As I said before to make a decision you need to consider the cost, time to market, app performance and providing a great user experience. So before making a decision here is what you need to know:

  • The big advantage of cross-platform solution is that it provides a less costly and faster way to get to the market in the beginning.
  • Cross platform means one code base that can be maintained easier.
  • If you are a company that already employees web developers you might think that going cross-platform will save you money in hiring/training people but the truth is that building a cross-platform app without using some tool is damn painful and slow and each tool has it’s own learning curve. Having said that of course Android and iOS SDK have their own learning curves and the use HTML/CSS will definitely make a web developer feel that at least he/she is not starting from scratch to learn something new.
  • An HTML5 app that is loading web views from a server is much more easier to test and deploy. If you build a web based solution then code and bug fixes can be instantly deployed to the server. Native apps on the other hand take much longer to be released. Apple has a review process and even if you just changed a comma it will take a few before the update is available. Google Play is faster but it takes a few hours from when you submit an app until the users are able to download/update the app. The downside of this approach is that the app cannot work offline (i.e. when the user has no internet connection the app doesn’t work).
  • Native apps have full access to the device’s APIs. Cross-platform solutions offer support to a subset of native APIs but with every update of the native SDK you have to wait for the tool you chose to catch up and incorporate the new API capabilities into their own API.
  • Native apps have better security because they have access to the OS security features.
  • Native code is always faster than Javascript! What’s more if you thought than the use of Javascript means that no specific customisations per operating system / device are needed think again. Javascript doesn’t always work the same on iOS and Android. Even Android 2.x and 4.x have differences.
  • Native means better user experience. Each platform has its own User Interface design guidelines. For example in iOS the tabs go on the bottom; in Android the tabs are on top. Transitions on iOS are different from transitions on Android. One solution fits all might mean providing a mediocre user experience across all platforms.

There are two major risks when developing a cross-platform app:

  • What if down the line you need to add functionality that is simply not supported unless the app is native? What will be the cost for scratching the code you have and develop from scratch the app to be native?
  • What if tomorrow Apple decides to start rejecting apps built with PhoneGap or are webpages are wrapped in app containers? Similar things have happened in the past when Apple started rejecting/deleting apps that were using specific libraries.

One final piece of information: Facebook and LinkedIn started by developing HTML5 apps but then decided to drop HTML5 and move to native development.

Do you still except a short answer? Choose cross-platform if you are looking for a cheap, fast way to get to the market. If you truly want to build the next great app and stand out of the competition then go native.