Insights into developing a mobile app across Operating Systems (OS)
When it comes to choosing a mobile device most of us go according to brand or functionality on offer. Few of us understand the operating system that underlies the device, and even less the complexities involved in developing apps for mobile operating systems, namely Android and Apple (iOS). How much of the code can be re-used? Is there a right way and a wrong way of tackling a mobile app development project that spans operating systems? These are just two of the questions that this article attempts to address.
In layman’s terms coding a mobile app for both iOS and Android could be equated to authoring a book in one language and then translating this into another language. It’s fairly obvious that the process would be more tedious if the author attempted to write the book in both languages at the same time, as each change would need to be duplicated. Hence, logic dictates that the author complete the book in one language and then translate the finished product into the other language.
The same applies to coding an app for both Android and iOS devices. It is more efficient to complete the app on either Android or iOS, and then re-use certain elements like branding and user experience when developing on the other operating system. Icons and buttons may not be identical on both operating systems, but they would be close enough to suggest re-use. The code, however, would need to be re-written from scratch.
When an app is required to be developed on Android and iOS, the best approach is to start by developing the app on the operating system that the project team has the most experience with. Then switch to the other operating system. In this way, the app can ideally be signed-off in the one environment and then coded again with the assistance of hindsight.
Being a closed environment with a limited number of devices makes developing an app on iOS more structured. The iOS development environment is graphically orientated which simplifies screen design. Android, on the other hand, has numerous different devices running on it. This complicates matters as code needs to be compatible across devices with different screen sizes and resolutions. This is best achieved by creating screens in XML using layout managers to ensure the app runs as expected on any Android device. Even so, there can be exceptions such as HTC devices where code may need to be tweaked slightly to ensure the Android app runs on these devices as it would on Samsung devices, for example.
Android is probably the easier of the two operating systems to get up to speed on. This is purely as Android is based on the Java language, which is widely used and understood. iOS is based on a language called Object-C, which has its roots in Java but that’s where the commonality ends. iOS has also introduced a new language called Swift, which is intended to be more resilient and concise than Object-C.
Despite which operating system an app is developed for, the code will need to be maintained over time to stay in sync with operating system upgrades which introduce additional functionality and more efficient versions of components already is use. “Change is the only constant” is certainly true in the world of mobile software development.
Therefore, just as two readers can enjoy the same book in different languages, an app can be coded on Android and iOs to be identical to the naked eye. But the effort in achieving this should not be underestimated and the operating system with the best understood language should be tackled first.