Cross Platform Mobile Development

Cross platform mobile App development has matured over the years and there are various stable options available at the moment. What are the options and how does one choose? The options that we will examine here are:

  • Cordova
  • React Native
  • Xamarin
  • Go Native

There are other options such as NativeScript, but these have not yet achieved the same popularity as the options we will study here.

Cordova (Formerly Known As PhoneGap)

Cordova is the most venerable of the cross platform App development tools. It allows web developers to use their HTML, CSS and JavaScript skills to create Apps that will work across platforms such as:

  • iOS (iPhone / iPad)
  • Android
  • MacOS (AKA OS X)
  • Windows (8.1, Phone 8.1 and 10)

From a technical perspective, Cordova creates some native scaffolding code that creates a basic App with a web window in it. You entire App is then rendered in the web window. Cordova also creates some plumbing code so that your App JavaScript can access some native features of the device. For those times when Cordova just doesn’t cut it and you need to write some native Swift, Java or C#, Cordova allows you to write a plug-in in native code which can be called from your JavaScript. So, in summary, Cordova lets you use the existing skills of your web team to write Apps. Cordova is the most mature of the web-based cross platform tools and so is the least likely to give you a lot of problems. Having said that, Cordova uses “older” technology compared to React Native and doesn’t provide an out of the box user interface framework, so you’ve got to pick one or create your own.

cross-platform-app-development

The fact that Cordova allows you to write native plug-ins is a clue to some of the problems that you may have! Cordova (like the other cross platform mobile development tools) is a jack of all trades. Sometimes you just can’t access some feature of the device using Cordova and you need to know how the native platform works and how to program it. For example, in our first Cordova App years age we needed to save some information in an encrypted format in the KeyChain and this was not possible with Cordova at the time so we had to write a native plug-in.

Using a cross platform App development framework does not relieve you of the burden of understanding the device. Whilst Cordova does a good job of hiding differences between different platforms, you still need to read the platform documentation and understand how the features work on the device (e.g. you need to understand what type of geo-location data iOS gives you back).

Finally, Cordova renders your user interface in a browser window. This means that you are at the mercy of the web browsers slowness, glitches and peculiarities. In particular, we have found issues with some menu animations on different devices that lead to a “glitchy” user interface that you either accept as part of the cost of doing cross-platform development, or you spend a lot of time and money fixing.

A core driver for cross platform development is frequent cost-saving, this flies in the face of the fundamental motivation. In fact, we have consistently seen that cross-platform development yields no cost saving over creating two native Apps (iOS and Android) due to platform-specific peculiarities.

So, overall, if you want a stable, well-used web-based platform and you are not too worried about glitches and using more modern technology, Cordova could be for you!

React Native

React Native is another cross platform App development framework that uses web technologies to help you create mobile Apps. Unlike Cordova, React Native performs wizardy to convert JavaScript into native code which gives a better performance than just running in a web window. React Native is built on top of React which is a modern web-based platform.

iOS-and-android-cross-platform-development

A key advantage of React Native is that is renders native UI components instead of just some HTML that you write out. This means that yours Apps have the look and feel of Native Apps and are faster and less glitchy than Cordova Apps.

As with Cordova, React Native doesn’t allow you to access every feature of your mobile device (check the documentation for current feature support), so you will still need to be able to drop back to native code at some point in your App development process. You will also still need to have a good understanding of your App’s platforms. New features in that are released in the native SDKs for different platforms also have a bit of a delay before they are release in React Native. If you are going to be using cutting edge device features, perhaps React Native is not for you!

If you are looking for a modern, JavaScript-based approach to cross platform App development, React Native could be what you are looking for. Be sure to beware of the odd user interface glitch, differences in Apps on different platforms and the lag time for new technology to be added to the framework.

Xamarin

Xamarin is now owned by Microsoft and has received some serious investment in the last couple of years. It is now a far cry from it’s early, buggy days where it could not be recommended for serious Apps! Xamarion allows C# developers to program cross platform Apps. The C# code that is written (using Visual Studio for example) is interpreted in different ways on different platforms. Microsoft provide a lot of information on this. In summary, Xamarin works differently on different platforms and different features are available on different platforms, so before you start to use Xamarin, check out the latest documentation and make sure that you will have access to the right features.

Xamarin’s user interface development is not as good as React Native. It’s harder work to get something working the same cross platforms. It is very good at forms-based applications, which makes it a great candidate for internal Apps inside corporations.

Xamarin’s biggest problem is that it is a thin wrapper over the top of Native APIs. We were recently implementing some Bluetooth code in Xamarin for example. We found that the C# APIs for this are very different on Android and iOS because the Native APIs are very different. In other words, Xamarin mostly just allows you to program against Native APIs in C# instead of Swift or Java. If you use Xamarin, you’ll have a lot of “if platform == iOS” kind of statements. This pretty much kills off any cross platform cost saving that you might be expecting.

So, overall, if you’re looking for an internal, corporate cross platform App development framework, Xamarin could be for you.

cross-platform-development

Go Native

This is a cheat since it isn’t actually a cross-platform approach, but we believe that it is the best approach if you have the skill set and want a great user experience and the fewest number of technical problems in your product. The core problem with iOS and android cross platform App development, in particular, is complexity. Your product will have all the problems associated with iOS, all the problems associated with Android AND all the problems associated with your cross platform framework. This is a more complex environment to work in rather than a simpler one as there is more to manage and more to go wrong!

The use of the native platform for your Apps means that whatever problem comes up in development can be solved. The use of a cross platform framework adds a new limit to the ability to solve problems to just whatever the framework permits. This makes going native the lowest risk approach to your cross platform App development.

Developers also get a great Integrated Development Environment with native tools (Visual Studio for Windows, XCode for iOS and Android Studio for Android) rather than muddling through with something that was not quite designed for the job. Developers will also get the greatest range of third party libraries and components to use in their Apps which reduces the cost of development. Developers will also get access to the latest, greatest features as soon as they are released, rather than having to wait for their framework to implement them.

The user experience provided by Native Apps is as good as the platform can provide and is superior to any of the cross platform frameworks. It is designed and implemented specifically for the platform and renders quickly and without glitches.

In terms of cost, our experience shows that there is no cost difference between “going native” and using a cross platform mobile development framework.

The core disadvantage of Native Apps is that developers are required to know multiple programming languages (C#, Swift and Java) to develop on all platforms. In our experience, this has not been a problem. Although the programming languages are different, the underlying platforms are similar enough to not be too much of a burden.

If you are looking for the lowest risk approach, best user experience App and access to all features, Native is for you!

What Can We Do For You?

If you are looking to have a Native or cross-platform App developed, contact us now using the form below.

Nick McKenna
Since 2004, Nick McKenna, BSc, MBCS Biography has been the CEO of McKenna Consultants. McKenna Consultants is a bespoke software development based in North Yorkshire, specialising in Cloud development, mobile App development, progressive web App development, systems integration and the Internet of Things development. Nick also holds a First Class Degree in Computer Science (BSc) and wrote his first computer program at the age of nine, on a BBC Micro Model B computer. For the last 21 years, Nick has been a professional computer programmer and software architecture. Nick’s technical expertise includes; Net Core, C#, Microsoft Azure, Asp.Net, RESTful web services, eProcurement, Swift, iOS mobile development, Java, Android mobile development, C++, Internet Of Things and more. In addition, Nick is experienced in Agile coaching, training and consultancy, applying modern Agile management techniques to marketing and running McKenna Consultants, as well as the development of software for clients. Nick is a Certified Enterprise Coach (Scrum Alliance), SAFe Program Consultant (SAI), Certified LeSS Practitioner (LeSS) and Certified Scrum@Scale Practitioner. Outside the office, Nick is a professional scuba diver and he holds the rank of Black Belt 5th Dan in Karate.