Contact Info
- Lilongwe, Malawi
- +265 899 25 21 95 (Whatsapp)
- contact@webmobyle.com
- Working Days: Monday - Friday
Download Audio: The Challenges of Cross-platform Mobile App Development
This is October 2019, and 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 obviously decide, 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. This also means that you have to maintain two separate teams, which turns out to be quite 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 a small team.
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.
The hybrid approach resonated with me at first, 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 resources 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 by Facebook..
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 the learning curve to develop apps using Flutter 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 have now worked out how to integrate Flutter apps to work using web apps as the backend and database driver.
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 and simulators. I think emulators and simulators are the next best thing since sliced bread. Emulators and simulators are mobile devices that are created from software, on the developers computer, to simulate an actual device.
Once the emulator or simulator is running, it behaves as a real mobile device, such that a developer can test apps on the virtual device. It is really amazing how well these tools work. With an emulator or simulator, you can test a fairly large set of phone behaviours.
Since emulators and simulators 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 and simulators 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 biggest challenge I’ve had to face is what I call the Apple Conundrum. The Apple Conundrum sets complications for me as a developer 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 different time spans, such as hourly, weekly, monthly and 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.
Want to hear some more from the Webmobyle Blog? Please
Leave A Comment