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 mobile 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 PlugIn 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.

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. As a core driver for cross platform development is frequently 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.

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 development, React Native could be what you are looking for. 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 waords, 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.

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 cross platform app development 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 what ever 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 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 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!

Notice: JavaScript is required for this content.

Nick McKenna

Nick McKenna is a (polymath) computer programmer and scaled Agile consultant. Nick has been a professional programmer for over 20 years and an Agile guru for nearly as long! Nick's specialities include progressive web app development, mobile app development, the Internet Of Things, Azure cloud development, systems integration, Scaled Agile Framework, Scrum, Lean, LeSS, Scrum At Scale and much much more.