The Challenges of Cross-platform Mobile App Development

Pin It

Mobile Development
I recently made the decision to go into mobile app development. Once you make such a decision, there are inevitable consequences. In software development, as in  everything else, there is more than one way to do everything.

The first important decision you have to make as a mobile app developer is to decide, obviously, how you are going to do it. There are two major mobile operating systems; Android and Apple iOS. Realistically, you have to develop for both platforms because if you choose one you leave out users on the other.

It is either you have the capability to develop for both platforms or you belong to one of the two teams that will work together to produce any particular app or you maintain two separate teams which turns out to be expensive.

Developing for both mobile operating systems means learning two very separate and different programming languages and tool-chains. This approach is both difficult and time consuming and truthfully not a realistic approach for a single developer or team.

Going Cross-Platform

In response to the challenge of developing across two platforms, I decided to go cross-platform. Cross-platform mobile development is an approach that makes use of a single code base to develop mobile apps for both Android and iOS.

There are several options for cross-platform mobile development. One such option is to develop a web app and put it in a wrapper for the native platform. These are called hybrid apps with examples such as apps built with Cordova and Ionic frameworks. Native is the term used to describe apps developed in the mobile platform’s original programming languages. 

This approach resonated with me since I come from a web development background but I chose not to take this route because apps developed this way do not closely and efficiently make use of the native infrastructure on a mobile phone.

My next option was to go with React Native. React Native is a cross-platform mobile app development framework based on the popular React web framework from Facebook. React Native was OK but has a steep learning curve and I found myself not making much progress.

React Native makes use of components to build the user interface and uses JavaScript as the programming language. The JavaScript is then compiled to produce native apps. However, React Native components are developed by the community and not Facebook which sort of presents a bit of a disconnect.

Then I discovered Flutter. Flutter is a relatively new mobile development software development kit that works with the Dart programming language to produce beautiful native apps on both Android and iOS from a single code base. Flutter is from Google and everything is well integrated and the learning curve is not bad.

Encouraged about what I researched on Flutter I deeply dove into a course from Udemy which I greatly enjoyed. Within a few weeks I was confident in cross-platform mobile development and I am now building my first app that integrates with an existing web app’s database.

Cross-Platform Mobile Testing

Even working with a cross-platform software development kit like Flutter does not exempt the developer from having to test the apps built in their native environment. Testing is a crucial step in every software development project. You do not want your app to break whilst it is in production hence it is critical to test extensively to eliminate bugs.

In order to test mobile apps, a developer can make use of emulators. I think emulators are the next best thing since sliced bread. Emulators are mobile devices that are created on the developers computer to simulate an actual device.

Once the emulator is running, it behaves as a real mobile device does such that a developer can test apps on a virtual device. It is really amazing how these tools work. With an emulator, you can test phone behavior, even to the point or rotating a screen.

Since emulators are simply software versions of mobile phones, a developer can easily test an app on multiple devices with varying screen sizes. This cuts down on cost because it is important to test an app on various devices to see how it performs on different mobile phones.

Whilst emulators are fantastic, they do not replace the need to test on actual devices. Testing on actual devices gives more assurance that an app will perform well and as expected in the wild.

The Apple Conundrum

The biggest challenge I’ve had to face is what I call the Apple Conundrum. The Apple Conundrum set complications for me on two fronts. The first is a matter of restriction and the second is a matter of expense.

Apple is so hung up on the idea of exclusivity that they restrict who gets to develop on their platform. As a rule, you only use Apple products to develop Apple software. This includes the entire tool-chain from hardware to software.

What this means is that even if I work on a single code base in Flutter, I would still need an Apple Mac to produce an iOS version of an app. It also means that I cannot test the iOS version of an app unless I have an iPhone and neither can I run iOS emulators on a PC.

I have never in my life owned a Mac. I am a die-hard Linux user which means without a Mac I can only produce Android versions of the apps I create. The ideal therefore is to buy a Mac on top of my Linux machine. But those things do not come cheap!

As you are probably well aware, nothing from Apple comes cheap and I can’t afford a shiny Mac at the moment. Determined to find a solution, I looked into alternatives ranging from a hackintosh to virtual machines but finally settled on a cloud service.

Some research led me to MacIncloud, which is a cloud hosted Mac service where you get to connect remotely and use a Mac Mini for a fee. I like the fact that with this service I can rent a Mac for as little as hourly, weekly, monthly up to yearly.

Whilst renting a mac in the cloud is not perfect and the latency and speed is horrible at night, I am able to use a Mac during the day which is sufficient to get by for now. Until I can afford a new Mac, this will have to do for the time being. 

Pin It