So you want to build a mobile app

App Nativa o no?

So you want to build a mobile app? The decision doesn’t end there. Whether you choose a native Android or iOS app or a cross-platform language such as React Native or Flutter will almost certainly affect the cost and will definitely affect the performance.

Theoretically speaking, any app could be developed with either native or cross-platform. And while some developers have strong preferences for one or the other, at SPOT. we believe that there is room for nuance.

Wouldn’t cross-platform development halve my costs? It’s true that cross-platform allows us to develop one app instead of two, but typically the savings are more like 30% over two native apps. We can save more time by coding generic script libraries where possible, allowing certain code modules to be inserted in both Android and iOS applications.

If the application is image-heavy or needs to interact with smartphone functionality (GPS or Bluetooth for example), managing this with cross-platform development will be complex and the resulting application will use the phone’s resources more intensively (resulting in heavier battery consumption, for example). This article tries to quantify app performance with different development methods.

The main advantage of native code is that it talks directly to the phone’s operating system. There are no ‘interface’ layers getting in the way. When we need advanced functionality or heavy image or video use, this translates into better performance.

Below, SPOT. senior mobile developer Luca Giorgetti talks us through three different application scenarios and factors to take into account when making a choice.

Scenario one: weather app. 

This is a relatively simple app in terms of functionality. It needs to look up your phone’s location (once is enough) then bring back the weather report from a remote server.

Bar a short interaction with the phone’s GPS function, there is no interaction with the phone’s functionality. We don’t have any images or other moving parts. It probably won’t be open for very long, because let’s face it, there’s only so long you can think about the weather.

This app can certainly be coded using React Native or Flutter, which will cost less than developing two separate apps for Android and iOS. (Flutter is made by Google so you might have a slight advantage when using other Google products, otherwise the choice depends mainly on what skills you have access to).

Scenario two: photo editing app

Here the requirements are a bit more complicated. We need to get into the phone’s photo app, select photos and manipulate them. Functions such as cropping, moving or filtering photos can use a lot of processing power if the programming tool doesn’t communicate directly with the phone’s operating system. What does that mean? The app will perform sluggishly, the phone will get hot and the battery will drain quickly. To get the most out of this app we recommend native development.

Scenario three: personal training application which syncs with your fitness equipment 

Here we are entering IoT territory. This app needs to sync with the treadmill, bicycle or whatever sport you prefer, probably via Bluetooth. It needs to run for the whole training session without running your phone (or tablet) battery down. It needs to use your phone’s accelerometer, and possibly the camera. When we need this kind of heavy, sustained use of the phone’s hardware it would almost certainly be more complex and expensive to develop a stable app using cross-platform development.