Should I build a native or a cross-platform mobile app?
That's a common question among all the startup founders who want to develop a mobile app, each one of those approaches has its advantages and disadvantages, today we are going to talk about them all and make your decision easier.
There are a lot of cross-platform technologies available that allow building apps for multiple platforms (iOS, Android, Desktop of Web) from a single codebase. Among the most popular ones, we can enumerate React Native, Xamarin, and Flutter, we are going to talk about each one of those as they have certain particularities that we find worthy of mention.
React Native works as a mediator between the native iOS and Android platforms, which means that UI components from React Native will be converted to native components by the framework. In simple words, a button from React Native will be translated into a native button on Android, and a native button on iOS.
- Cross-platform — you can build apps for different platforms from the same codebase.
- UI components upgrades — when Apple or Google releases a new version of their mobile OS, usually there are changes to the UI elements since React Native is mapping to native components, you'll get the upgrade instantly.
- Deprecated libraries — React Native developers use a lot of obscure libraries which could be deprecated or their maintainer does not update them periodically, which means that sometimes the developers who build the app would have to modify and maintain those libraries.
- Harder debugging — the way React Native is built makes debugging much harder than for native platforms. In addition to this, when receiving crash logs from the users, those won't be of great value, as they are not mapped to the React Native code from which the app was built.
- Different looks on iOS vs Android — while mapping React Native components to native ones has advantages, it also has disadvantages, the main one being that you won't have the same pixel-perfect UI on both platforms due to the mapping.
Developed by Microsoft Xamarin, uses C# and the .NET framework for building cross-platform Android and iOS apps.
Microsoft has its paradigm of developing mobile applications, there is an extra learning curve. For the UI part of an app, Xamarin can use either platform-specific code or Xamarin.Forms which is a cross-platform UI library.
- Cross-platform — you can build apps for different platforms from the same codebase.
- UI consistency — if using Xamarin.Forms, the UI of the iOS and Android app will look similar, the main difference being on the way navigation from one screen to another is conducted (as there are differences between iOS and Android).
- Costs — while Xamarin has a free version with limited features, if you want to take advantage of the full platform, there are licensing costs (around $1.000/year for small businesses at the time of writing).
- Debugging — Xamarin is known for its bugs as a platform, so when discovering a bug, a developer would have to investigate it on 3 platforms (iOS, Android, and Xamarin).
- Lack of developers — there aren't too many Xamarin developers available, you'll have a hard time finding one, this is mainly because of Microsoft's paradigm and the associated costs.
One of the youngest and most promising and popular cross-platform development technologies comes from Google and is called Flutter.
Flutter uses Dart as a programing language and allows true cross-platform development (iOS, Android, Web, and Desktop). Flutter has its own engine for the user interface, it uses 2 different design widgets that imitate both iOS and Android's UI components.
- Cross-platform — Flutter allows building apps from the same codebase for multiple platforms, not only mobile, it has support for iOS, Android, Desktop, and Web.
- Performance — among the cross-platform solution Flutter offers the best performance, as its graphics and visualization engine built into C/C++.
- Popularity — Flutter is the most popular cross-platform technology according to Github and Stackoverflow questions.
- No free UI upgrades — since Flutter does not map its UI components to native ones when the OS updates and the components are changed, an app developed with Flutter will look the same.
- Limited support — a lot of libraries and features have limited support, which means there are a lot of native functionalities which can not be used in a Flutter app, when the mobile OS changes, your app won't be able to use all the shiny new things until they are ported to Flutter.
The only recommended way by both Apple and Google (even that they invest in Flutter) of building mobile apps is using native technologies. On iOS apps can be build using Swift or Objective C as programming languages and while Android supports Kotlin and Java.
For building an app that would run on both iOS and Android using native technologies, two codebases are needed, one for iOS and one for Android.
- Performance — native apps have far better performance than all the cross-platform approaches as they run directly on top of the OS.
- Updates — when a new version of the OS is released, a native app will get automatically all the new UI elements without needing to modify the app, and also get access to the latest available APIs and new features of the SDKs (such as improved AR/VR components, access to enhanced security features, etc.).
- Mature platforms — finding native developers is easy, they usually focus only on mobile development so they have a lot of experience in this particular type of software. Moreover, since both iOS and Android are available for quite some time, there are a lot of open-source libraries, UI components, and tools for making the development process faster.
- Stability — an app built with native technologies will continue to run on the newer versions of mobile.
- Advanced tools - — both Apple and Google offer advanced tools for development and debugging.
- Not cross-platform — if a company or a founder wants to offer their mobile app on both iOS and Android, it needs to have two separate codebases using different technologies, and libraries.
The main reason someone would want to develop an app using cross-platform technologies is the cost. The idea of having a single codebase is appealing to many startup founders, however, we've discovered that going cross-platform does not necessarily mean lower costs.
In addition to the already mentioned disadvantages of the cross-platform technologies, they also have some extra ones, such as an increased size of the app (which means it will occupy more space on the phone of the user), and increased complexity as the codebase grows.
We've discovered that in cross-platform projects once the codebase starts to grow, and more complex features are added, we would need to write platform-specific code. In addition to this quite often we would also need to write native code, for handling specific cases and APIs. As an example, we needed to write native code for both iOS and Android when we've built a cross-platform app that had an AR/VR component in it, as React Native did not know how to handle the different frameworks used by both platforms.
While costs were lower at the beginning of the project, the added complexity made developing new features extremely slow and costly.
Cross-platform development is suitable for small applications in which the user interface is not that important, has a limited set of features, and there are no plans for adding more features, for instance, an access app to a conference, or a corporate app that displays company news. Or, for large enterprises which have all their web apps written in React and they can easily transition some of the features on the mobile apps as well.
While cross-platform might seem like a good idea and looks good from a cost-wise perspective when starting a new project as compared to native technologies, as time passes and more features are added, new OS versions and SDK appear, cross-platform approaches become more expensive and rigid to adding new features. In addition to this, there is no guarantee that they will work on the next version of the mobile OS, and the user experience they provide is much more inferior to their native counterparts.
Besides all the above-mentioned advantages of native development, it is also important to point out that native development tools surpass by far the cross-platform ones. For instance, when designing a native user interface, developers could use tools from Xcode or Android Studio for visually building the UI, which makes the development a lot faster. In addition to this, both development environments offer advanced debugging tools which make finding and fixing a bug much more easily. Furthermore, native platforms also provide out-of-the-box, easy ways of testing the flows or the user interface of the apps.
At appssemble, we've decided to build all our apps using native technologies, not only because they are more stable, secure, performant, and run better, but also because it's the only safe, reliable, and approved (by Apple and Google) way of building an app.
... and we are not the only ones, Facebook, the company that created React Native, has switched from React Native to native development for their messenger apps, Airbnb has done the same, Udacity as well, and the list could go on and on.
We build a lot of mobile apps for startups, and for a startup, it's important to be able to take advantage of the latest SDKs, it's also super important to be able to deliver new functionalities quickly and to be able to build on top of an MVP. We also strong believers that it's important to respect each platform and adjust the user interaction to the platform's guidelines, what works for an Android user might not be that intuitive and user-friendly for an iOS one. After all, a startup needs all the competitive advantage it can get, to attract new customers and turn the existing ones into raving fans, and we believe going native is a major advantage over the cross-platform approaches, from both a user experience as well as from a performance one.
As for the costs, in the long run, by doing native development, the costs will be at worst similar, but in the vast majority of cases, the native will be cheaper. A common mistake startup founders make when deciding to go with a cross-platform approach for their MVP, is that they assume that the price for it will be half the price of native apps, this is usually not true, and a more realistic cost would be 75% of the cost of both native apps (as both native apps will use the same backend solution, and most of the business logic is the same, so most of the times is just porting the solution to the other platform).